Tubby Posted December 23, 2021 Report Share Posted December 23, 2021 Hi, Anyone knows how to make the checkbox inside the grid edit pop-up modal checked by default? I am talking about this: I tried looking into the the options in "Configure Fields for Bulk Edit" page but even when set to required, it still needs to be clicked. Any help would be appreciated. ~Tubbs Quote Link to comment Share on other sites More sharing options...
Kurumi Posted December 23, 2021 Report Share Posted December 23, 2021 Hi @Tubby - you may try this code: <script> var element = document.querySelector('div[id="BulkUpdateForm"]'); if (element.visibility==="hidden") { document.querySelector('input[name="EnableBulkEditFIELDNAMECkb"]').checked = false; } else { document.querySelector('input[name="EnableBulkEditFIELDNAMECkb"]').checked = true; } </script> Insert this under Search and Report Wizard - Configure Fields for Bulk Edit. Add Header and Footer and in Footer paste the code. Make sure to disable first the HTML Editor on the Advanced tab: https://howto.caspio.com/faq/web-forms/how-to-disable-html-editor-in-datapage-headerfooter-and-html-blocks/ To know the form element of the checkbox, you can check it on Inspect (Right-click to your browser -> Inspect), see the image below: Hope this helps! Tubby 1 Quote Link to comment Share on other sites More sharing options...
Tubby Posted December 23, 2021 Author Report Share Posted December 23, 2021 I knew it would require some JS! This works, just dont forget he "Ckb" part of the field's name. Thank you @Meekeee Quote Link to comment Share on other sites More sharing options...
Kurumi Posted May 20, 2022 Report Share Posted May 20, 2022 Hi - just wanted to update this post. If you want to enable the Update button as well in the Bulk Edit, you can use this code: <script> document.querySelector("input[name='EnableBulkFIELDNAMECkb']").click(); setTimeout(function(){ document.querySelector("input[name='EnableBulkFIELDNAMECkb']").dispatchEvent(new Event("change")); }, 100); </script> 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.