Jump to content

Tick grid edit checkbox as default


Recommended Posts

Hi,

Anyone knows how to make the checkbox inside the grid edit pop-up modal checked by default? I am talking about this:
image.png.c18fb9a5c37f10bdf97704d6c76dd309.png

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

Link to comment
Share on other sites

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/

image.png

To know the form element of the checkbox, you can check it on Inspect (Right-click to your browser -> Inspect), see the image below: 
image.png

 

Hope this helps!

Link to comment
Share on other sites

  • 4 months later...

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>
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...