KG360 Posted October 14, 2022 Report Share Posted October 14, 2022 It seems several scripts that I have successfully implemented (thanks to the forum for all help on that) sems to have stopped working with the new release. Could this be for real? If true I need to start all over creating essential functionality... Does anyone know? /KG One example is an error that hide the submit button in a form: <script type="text/javascript"> document.querySelector('[id*=Submit]').style. Display = 'none'; document.addEventListener('DataPageReady', function (event) { document.getElementById("InsertRecordFormStatus").addEventListener('change', function() { if (document.getElementById("InsertRecordFormStatus").value != 'Yes') { document.querySelector('[id*=Submit]').style. Display = 'none'; } else { document.querySelector('[id*=Submit]').style. Display = 'inline'; } }); }); </script> Quote Link to comment Share on other sites More sharing options...
Ilyrian Posted October 17, 2022 Report Share Posted October 17, 2022 Hi Can you please try following code: <script type="text/javascript"> document.querySelector('[id*=Submit]').style.display = 'none'; document.addEventListener('DataPageReady', function (event) { document.getElementById("InsertRecordFormStatus").addEventListener('change', function() { if (document.getElementById("InsertRecordFormStatus").value != 'Yes') { document.querySelector('[id*=Submit]').style.display = 'none'; } else { document.querySelector('[id*=Submit]').style.display = 'inline'; } }); }); </script> KG360 1 Quote Link to comment Share on other sites More sharing options...
KG360 Posted October 17, 2022 Author Report Share Posted October 17, 2022 10 hours ago, RagnarIllyrian said: Hi Can you please try following code: <script type="text/javascript"> document.querySelector('[id*=Submit]').style.display = 'none'; document.addEventListener('DataPageReady', function (event) { document.getElementById("InsertRecordFormStatus").addEventListener('change', function() { if (document.getElementById("InsertRecordFormStatus").value != 'Yes') { document.querySelector('[id*=Submit]').style.display = 'none'; } else { document.querySelector('[id*=Submit]').style.display = 'inline'; } }); }); </script> Many thanks @RagnarIllyrian! I discovered the typos and have entered the correct script and it works fine. It seems that the script also disables the submit function, even though there is no instruction specifically for it. 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.