dbromfield Posted April 5, 2016 Report Share Posted April 5, 2016 I received wonderful assistance yesterday from the community with filling a caspio form field with value calculated by javascript routine in the footer of the submission form. It works beautifully!! I would like to automatically submit the form after filling the field & so get rid of the 'submit' button. Any help is greatly appreciated. The current fill form routine that works well is below: <SCRIPT LANGUAGE="JavaScript"> function Fill_field() { document.getElementById("InsertRecordPeriod").value = (pperiod); } /* On submitting the webform, the function Fill_field is executed */ document.getElementById("caspioform").onsubmit=Fill_field; </SCRIPT> Quote Link to comment Share on other sites More sharing options...
MayMusic Posted April 5, 2016 Report Share Posted April 5, 2016 There is an auto submit code which you can use in your code at http://forums.caspio.com/index.php/topic/4314-js-auto-submit-a-datapage/ You need to call your function before submitting the page and then auto-submit in the function. For instance <SCRIPT LANGUAGE="JavaScript"> function Fill_field() { document.getElementById("InsertRecordPeriod").value = (pperiod); setTimeout('document.forms["caspioform"].submit()',1000); } /* On submitting the webform, the function Fill_field is executed */ Fill_field(); </SCRIPT> Quote Link to comment Share on other sites More sharing options...
dbromfield Posted April 5, 2016 Author Report Share Posted April 5, 2016 Thank you so much! The auto submit above works perfectly! Quote Link to comment Share on other sites More sharing options...
MayMusic Posted April 5, 2016 Report Share Posted April 5, 2016 You are welcome Quote Link to comment Share on other sites More sharing options...
mark048 Posted January 7, 2017 Report Share Posted January 7, 2017 . 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.