A multi-profile form handler component can be request- or session-scoped. The default scope is request: each time a user accesses a page with a profile form, the ATG platform creates an instance of the form handler that uses the configured values of the component’s properties. You can override the values of these properties using hidden input tags, but the values set this way do not carry over if the user accesses another page with a profile form.
Property values can persist across multiple pages if the form handler is session-scoped. For example, a long registration form might split across two pages, with the second page containing the form’s submit button. Navigation controls enable the user to move between the two pages before submitting the form. In order to retain values from both pages, the form handler must be session scoped; otherwise, values from one page are lost when the user navigates to the other.
If you set a form handler to be session-scoped, be careful about using hidden input fields to override default property values. The new values remain in effect throughout the session unless explicitly changed. For example, a registration page sets extractDefaultValuesFromItem
to false. If, during the session, the user subsequently accesses a page to update profile information, the fields in this form are not filled in with values from the profile unless that page explicitly sets extractDefaultValuesFromItem
back to true.