NikkiC Posted January 24, 2018 Report Share Posted January 24, 2018 Hi there, I am using the standard autosubmit script to send users to one form using parameters to auto fill it and autosubmit it and then on to another form. However some users get stuck in a loop if a field in the first autosubmit form are already in the table, and they never get to the second form and don't see the error message. Is there a way to write into this script "if field already exists in table [users] DO NOT autosubmit, instead show an error message? <script type="text/javascript"> if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); } </script> Many thanks Nikki Quote Link to comment Share on other sites More sharing options...
ChrisCarlson Posted January 25, 2018 Report Share Posted January 25, 2018 You can setup the autosubmit datapage to filter, and receive a value passed from referring page. The value would be a check value and you can create a calculated field to pass the check value to the auto submit datapage. Then for the auto submit datapage, update it's localization to display the custom message if it fails the filter condition. Quote Link to comment Share on other sites More sharing options...
MayMusic Posted January 25, 2018 Report Share Posted January 25, 2018 Create a copy of your Localization under Text >> Messages >> 351 No records found change it to custom and ass script to redirect user: <script> window.location= 'URL to autosubmit?email=[@email]';</script> You need to pass the values you want to receive in your submission form through this link . Create a details page which is filtered by the unique value which is now preventing users from submit. Use that Localization for this details page. If account is already in the database it will show the details of that if not then it will be redirected to auto submit form. 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.