DOCUMENTATION

Search »

Confirming everything's working

At this stage, you've configured your form to utilize the Form Tools' API. It's set in "test" mode only, so that nothing is actually being sent to Form Tools just yet. But here's a simple way to test everything's working as it should.

You may have noticed that in the PHP you added to your forms, the $api->initFormPage() method returns a $fields variable. This variable contains all form fields values that the user has submitted on each page. In other words, as the user progressed through your form, the $fields variable will keep getting updated to store all the info. If you choose, you can extract the form values from this variable to prefill any form field entered in the form. This is handy if you want to give the user the option of returning to a previous page to make changes.

To test everything's working, try this. On each page of your form, after the PHP you've already inserted (i.e. after this line):

Add the following line:

That will output the content of $fields on each page (albeit in a very ugly fashion!). You can use this to confirm that all the values being entered through your form are in fact being stored. Try going back to previous pages and updating the values. You should see the values being updated in $fields.