Unable to pull in current item on EditForm.aspx using StratusForms

I’m using StratusForms for a SharePoint 2016 classic application (system admin won’t enable modern pages) and was able to successfully use a CEWP on NewForm.aspx to contain my code and submit to my list using Stratusforms. The issue I am having is retrieving the data for an item on either my DispForm.aspx or EditForm.aspx. It looks as though it is related to the queryStringVar = “formID”, but I’m not sure if I am supposed to replace this with the form item ID (or how to extract that on load) or if it is meant to be there by default.

Here is what I have so far:

` var webAbsoluteUrl = _spPageContextInfo.webAbsoluteUrl;

$ (document).ready(function() {


}); function initializeStratusForms() {

$  ("#SFForm").StratusFormsInitialize({     htmlForm: webAbsoluteUrl + "/SiteAssets/StratusForms_Attempt/RequestDemoInnerHTML.html",     queryStringVar: "formID",     listName: "Reimbursable Requests",     completefunc: function() {          $  ('#POPStart').datepicker({             changeMonth: true,             changeYear: true         });          $  ('#POPEnd').datepicker({             changeMonth: true,             changeYear: true         });     } }); 

} `


Linking to EditForm.aspx using a specific content type doesn’t retrieve all data?

I have a list with three content types associated. These work fine for the addition of new data, but if I try to use them for the EditForm.aspx page, they don’t pre-populate any fields except the Title field.

The format of the URL I’m using is:

https://[MYSITE]/EditForm.aspx?ID=[ID OF THE RECORD]&Source=[SOURCE]&ContentTypeId=[CONTENTTYPE ID] 

It’s possibly the structure of the URL I’m using that’s wrong, but I’m not sure. Any help appreciated!


Hide element in IE in custom NewForm.aspx or EditForm.aspx

In custom NewForm.aspx or EditForm.aspx, the ribbon is hidden and the following is added:

<div class="row"> <div class="colFull" id="attachmentsOnClient">     <span dir="ltr">         <input type="file" name="fileupload0"  id="onetidIOFile" class="ms-fileinput" size="56" title="Name"></input>     </span>     <div id="ieAttachBtn">         <input name="Button1" type="button" value="Attach" onclick='OkAttach()' style="width: 6em; height: 1.7em" />         <span id="idSpace"></span>     </div>     <table>         <tr id="idAttachmentsRow">             <td nowrap="true" valign="top" class="ms-formlabel" width="20%">                 <SharePoint:FieldLabel ControlMode="Edit" FieldName="Attachments" runat="server"/>             </td>             <td valign="top" class="ms-formbody" width="80%">                 <SharePoint:FormField runat="server" id="AttachmentsField" ControlMode="Edit" FieldName="Attachments" __designer:bind="{ddwrt:DataBind('u','AttachmentsField','Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Attachments')}"/>                 <script>                     var elm = document.getElementById(&quot;idAttachmentsTable&quot;);                     if (elm == null || elm.rows.length == 0)                     document.getElementById(&quot;idAttachmentsRow&quot;).style.display=&apos;none&apos;;                 </script>             </td>         </tr>     </table>                             </div> 

ieAttachBtn is only needed in IE. It works without it in Chrome and Edge. Is there a way to show/hide this <div> based on browser?

I inserted the following code after PlaceHolderAdditionalPageHead, the alert works but the .getElementById().style.display does not.

<script type="text/javascript">   if (/*@cc_on!@*/false) {     alert('This is IE');     document.getElementById("ieAttachBtn").style.display = "block";   } else {     alert('This is not IE');     document.getElementById("ieAttachBtn").style.display = "none"; }    </script> 

Auto refresh the page in Editform.aspx with ID query string param with updated list item value in Presaveitem()

am having an editform.aspx page in my SPO site. am using presaveitem() in my content editor web part to perform validation and etc after completion of calling of presaveitem(), i ant to stay on the same page , ie, i wanna stay like : https://mycustomersposite/msite/lists/splist1/editform.aspx?ID=425 with the same ID, after refreshing the page automatically.

 function Presaveitem()  {    //perform validation .. etc      alert("Item is updated successfully on 11/05 monday");    alert('reloading the page');     window.location.reload();  return true; } 

The problem am facing is, after click on the save button, its automatically redirecting to the AllItems.aspx page always. what my understanding is if i call just before closing of Presaveitem() fun.call
window.location.reload(); , it will reload the page with the latest updates happened to the list items id , mentioned in the ?ID=mylistitemidnumber . How to stop redirecting to the allitems.aspx page from editform? is it possible to add a ?source param in the URL, ( inject it on page load) automatically/programmatically?