FORMfields, the premiere web framework
Support Home | Knowledge Base | Documentation | Forums | Contact Us
FORMfields & FORMgen :: Field Customizations

Passing Form Data to Another Form

(1342 views. Last Updated: 2008-12-22 10:01 PM)

There are multiple ways that form data can be passed to another form. Here are just a few of them:

1. Using a query string. Let's say you have the field:
$ffForm->addField(new PersonNameField("employee_name", "Employee Name", FORM_FIELD_REQUIRED));
you can pass the value of the field to another form by using a URL like:<?= $ffForm->getValue("employee_name"?>

2. Using a session. You can use the PHP global variable $_SESSION to store and then retrieve your entire form instance. For example in the 1st form you could use:
$_SESSION["my_form"] = $ffForm;
and then in the second form:
$ffForm = $_SESSION["my_form"];

3. Using a database. Please see for details on how to load/unload form data from/to a database.
Support | Earn Money
Copyright © 2005-2020 Brain Book Software LLC.
Built with FORMfields, the premiere web framework.