Jump to content
  • 0
DesiLogi

Bulk Edit Auto-Submit

Question

Hi,

Does anyone know how to put code in the footer of a Bulk Edit form so it auto-submits (so the user doesn't have to click the Update button)?  This code:

<script type="text/javascript">

  if(document.getElementById("caspioform")) {

  document.getElementById("caspioform").style.display = 'none';

  setTimeout('document.forms["caspioform"].submit()',1000); }

</script>

works only on a regular Update or Submission form. If you use it in Bulk Edit it just keeps refreshing the records over and over. So there must be some specific code for Bulk Edit. 

As well, if I can get Bulk Edit to auto-submit I'd like to remove he Update button so if anyone has code for that it'd be really great. Thanks!

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I can't help any with the bulk auto-submit, but once you get it working you can hide the submit button by putting the following into the footer of the DataPage:

<script>
     document.getElementsByName('Mod0EditRecord')[0].style.display = 'none';
</script>

 

Share this post


Link to post
Share on other sites
  • 0

@DesiLogi,

 

Try adding these lines of code on the Footer of Configure Fields for Bulk Edit:

<script>

var bulkEditSubmit = document.querySelector('.SimpleButton.ActionButton[value=Update]');
console.log(bulkEditSubmit);

setTimeout( () => { bulkEditSubmit.click(); }, 1000);

</script>

 

Worked for me.

Make sure that you are on the Configure Fields for Bulk Edit  section of your DataPage, and NOT on the Configure Results Page fields.

 

Also, do note that the Update button might be initially disabled, especially if there are no fields that receive a parameter ;).

 

P.S. The script I provided is a workaround, it synchronously waits for 1 second so Update button is enabled before it is clicked. I'll update this (or follow me up if I don't) when I find an asynchronous solution to this.

Share this post


Link to post
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
Answer this question...

×   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...

×
×
  • Create New...