TWIRED Posted December 28, 2016 Report Share Posted December 28, 2016 Hey folks, Im having 2 issues when trying to create a 2 page multi registration (autosubmit form ) 1) The 2nd autosubmit form keeps saying that the form is incomplete. Ive rechecked it and its setup correctly. 2) the javascript autosubmit from caspios site makes the page make go in an infinite loop. It keeps loading and trying to submit every second. 3) i dont think Im grasping the concept of the multi data page submission Ive tried it in simple test pages, the 2nd form wont submit cause it says required fileds are missing. Heres my Rig (setup) -------------------------------------------- Travel Agency Table -------------------------------- TagID (autonumber/primary/unique) TagEmail (unique key) ....+ other fields Travel Agents Table ---------------------------- TanID (autonumber/primary/unique) Tanemail (uniquekey) .... + other fields Form 1 -Guest Fills Travel Agency Info --------------------------------------------------------------- -pass parameters (TagID, TagEmail and 2 other form 1 fields). - Also I have Virtual Elements TanID, TanEmail (For Form2 ) , to pass parameters for autosubmission - all elements have load and pass parameters setup. After Submission > go to Hidden Form2 for auto submit Form 2 Hidden AutoSubmit ----------------------------------------- -load parameters ( TagID, TagEmail and 2 other variables) from Form1 (same names) - Footer has the javascript below Javascript in Footer of Form 1 ---------------------------------------------- <script type="text/javascript"> document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); </script> The Travel Agency Table (TagID PK) and Travel Agent Table (TanID PK) , TagID (FK) are in a parent child relationship. Im trying to have 1 single form where travel agency info and travel agent info are captured by the form and upon submission, both tables are filled with data. Quote Link to comment Share on other sites More sharing options...
TWIRED Posted December 28, 2016 Author Report Share Posted December 28, 2016 Solution Below.. Quote Link to comment Share on other sites More sharing options...
TWIRED Posted December 28, 2016 Author Report Share Posted December 28, 2016 Got it to work hope this helps someone. AUTOSUBMIT MULTIPLE PAGES (Submission forms ) TO 2 TABLES in a Parent-Child Relationship Tables are in a Parent-Child Relationship Submission Form- Destination setting - URL of Autosubmit form AutoSubmit Form - Destination setting - Display a Message Tips In the First Submission Form You dont need to create a virtualID element to pass the Primary Autonumber key. It gets sent by default. In the Auto Submit Form (2nd data page) Make sure the Foreign Autonumber Key and any Unique Keys are not hidden or in display mode, they should be as regular Fields. Dont hide them or they wont work. Make sure all of the above fields receive parameters or the form wont submit due to incomplete required fields The other fields you can leave hidden. In the Autosubmit form , the fields and submit button can be hidden with nodisplay tags in an HTML Block and also by using a Different Localization Passing parameters in 1st Submission form The Most Important thing while passing/receiving parameters use INSERTRECORDfieldname; Even in javascript for getElementById use INSERTRECORDfieldname Otherwise nothing works. Script That Finally worked and just submits once (doesnt loop) ----------------------------------------- <script type="text/javascript"> var tacyidvalue; tacyidvalue=document.getElementById('InsertRecordTacyID').value; if(tacyidvalue !=='') { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); } </script> Mathilda 1 Quote Link to comment Share on other sites More sharing options...
Mathilda Posted December 28, 2016 Report Share Posted December 28, 2016 Hi, thanks for sharing TWIRED 1 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.