Caspio makes it easy to create a wide variety of DataPages to easily collect, search, and view data. If you would like to create Caspio apps, but there are some HTML forms you must preserve, it is possible to tie these forms into your Caspio database and gain the advantages of your data being submitted to a central location.
You can use this technique whether your original form uses the GET or POST method.
- Create a Submission Form and apply the following configurations.
- On the DataPage Data Source screen, select the base table where you want to store the data submitted from your original form. Because you are receiving this data through parameters, enable advanced options and parameters.
- In the Select fields screen, select the fields you wish to receive by moving them from the left to the right-hand panel.
- On the DataPage Configure Fields > External Associations and Defaults section, select Receive value or parameter.
- By default, after your end-user clicks submit on the original form, the completed Web Form will display to your end-user and prompt them to click Submit again. In some instances this is a good option because you can format the DataPage to serve as a confirmation page.
- Redirect your end-user.
On the Destination and Emails screen, select where you would like your end-user to be directed after their information has been submitted. You can also activate notification and acknowledgement emails.
- Deploy the Submission Form and copy the deploy code URL. You will need this address to alter your original form.
- Change the form action to the Caspio web address.
- Go to the HTML page of your original form and locate the Form tag. Inside the Form tag there is an “Action” parameter that chooses the destination after the end-user clicks Submit.
- Insert the Caspio URL code into the action parameter for the form to pass the data to your Web Form.
- Add the AppKey to the original form items.
The portion of the deploy code URL after the question mark also needs to be passed using the original form. We accomplish this by adding a hidden element to the form. Create an input tag that will have three parameters: type=”Hidden”, name=”AppKey” and value=”The AppKey from your Caspio URL”.
<script> setTimeout('document.getElementById("caspioform").submit()',0); </script>