One of the most common things you’ll need to know if you are customizing your forms is whether or not a form has been submitted. You can use $db->formSubmitted() to check if a form has been submitted.
<?IF ($db->formSubmitted()):?> <p>Thanks for your submission!</p> <?ENDIF;?>
Remembering form items in automatic URLs
When displaying data, you’ll get sortable column headers and search fields automatically. But sometimes you want to maintain some options of your own from click to click. You can tell the plug-in which options to remember using formMemory().
<? $db->formMemory($optionList); ?>
You also have a pageMemory() method for remembering options in the automatic paging links.
<? $db->pageMemory($optionList); ?>
Items remembered using pageMemory() will be remembered across page links, but not across focus or return to list links.
Chaining forms together
Sometimes you need to remember information from one form but not submit it to the database until another form has been completed. The standard way of handling this is with hidden fields, and you can do that with this plug-in.
<? $db->hiddenFields($fieldList) ? ?>
The hiddenFields function works just like displayForm except that the information is all hidden. Note that because you are basically putting more than one set of form data on the page, you’ll need to also startForm().
This also sets _step to 1 (or you can add a second parameter to specify the step number, but you should avoid too complicated chaining).