bensminger Posted December 30, 2016 Report Share Posted December 30, 2016 I have a field called LockStatus that I do not display on the form (it gets checked somewhere else). If it is checked then I want to hide the update button. This is the code I'm using, however the update button refuses to hide. <script> if (document.getElementById("EditRecordLockStatus").checked){ document.getElementById("Mod0EditRecord").style.display="none"; } </script> Am I doing something wrong? Quote Link to comment Share on other sites More sharing options...
Mathilda Posted February 6, 2017 Report Share Posted February 6, 2017 On 12/30/2016 at 5:45 PM, bensminger said: I have a field called LockStatus that I do not display on the form (it gets checked somewhere else). If it is checked then I want to hide the update button. This is the code I'm using, however the update button refuses to hide. <script> if (document.getElementById("EditRecordLockStatus").checked){ document.getElementById("Mod0EditRecord").style.display="none"; } </script> Am I doing something wrong? Hi, I tried your code, it works on my datapage. Make sure that the LockStatus field is editable. If you don't need to display the field, you may hide a field using html blocks Quote Link to comment Share on other sites More sharing options...
thompson Posted November 10, 2017 Report Share Posted November 10, 2017 (edited) I am trying to Hide the submit button when a virtual field that is a cascading text field (non-editable) equals "0". I've tried different variants of code found here but I still can't seem to get it to work. I am posting it in the footer. This is what I currently have. <script> if (document.getElementById("cbParamVirtual2").==0){ document.getElementById("Mod0InsertRecord").style.display="none"; } </script> Edited November 10, 2017 by thompson named a field wrong Quote Link to comment Share on other sites More sharing options...
Mathilda Posted November 13, 2017 Report Share Posted November 13, 2017 On 11/10/2017 at 9:01 PM, thompson said: I am trying to Hide the submit button when a virtual field that is a cascading text field (non-editable) equals "0". I've tried different variants of code found here but I still can't seem to get it to work. I am posting it in the footer. This is what I currently have. <script> if (document.getElementById("cbParamVirtual2").==0){ document.getElementById("Mod0InsertRecord").style.display="none"; } </script> Since this is cascading field, try to get a field value by name, please find an example here Quote Link to comment Share on other sites More sharing options...
Breee Posted June 8, 2018 Report Share Posted June 8, 2018 On 12/30/2016 at 10:45 AM, bensminger said: I have a field called LockStatus that I do not display on the form (it gets checked somewhere else). If it is checked then I want to hide the update button. This is the code I'm using, however the update button refuses to hide. <script> if (document.getElementById("EditRecordLockStatus").checked){ document.getElementById("Mod0EditRecord").style.display="none"; } </script> Am I doing something wrong? I am also trying to apply the same logic on a bulk edit webform I need the update button to hide conditionally. I need to hide the update button when CorpEOPIDGen is checked (yes) . I'm unable to call the bulk edit update button to hide it based on the checked logic above. This is what I have so far. <script> if (document.getElementById("EditRecordCorpEOPIDGen").checked){ document.getElementById("Mod0EditRecord").style.display="none"; } </script> ...also tried <script> if (document.getElementById("BulkEditCorpEOPIDGen").checked){ document.getElementById("Mod0EditRecord").style.display="none"; } </script> I've yet to successfully hide the update button on the bulk edit webform. Any assistance would be appreciated. Thank you. Quote Link to comment Share on other sites More sharing options...
IamNatoyThatLovesYou Posted May 20, 2023 Report Share Posted May 20, 2023 Hello Everyone, you can also check this forum post that hides the submit button once it has been clicked/pressed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.