Visitor interaction with a WebForm
When publishing an ASP, ASP.NET or JSP Page with a WebForm added to it, the SDL Tridion Content Manager Publisher uses a code fragment that indicates the URIs of the Form Component and WebForms Component Template.
When a visitor opens the Page in a Web browser, this code fragment invokes the WebForms Server and the following process occurs:
The WebForms Server accesses the parameters specified in the code fragment:
- the URI of the Component (the Form XML)
- the URI of the Page
- any applicable Business Rules are used to prepopulate fields, show or hide fields, or calculate the values of fields such as date fields.
- a session ID is created to ensure that any data the user enters is persistent during this session.
- the Form is rendered using the Render XSLT
After the visitor has entered data into a Field, the relevance of other Fields is reevaluated. Fields that are relevant are displayed to the visitor automatically and Fields that are not relevant are hidden. If the form’s JavaScript property is set to browser/server, this action is performed on the client machine. The visitor can only navigate to a subsequent Form Page when all the Field values the visitor filled in on the current Form Page are valid.
If no errors are found, then the following process occurs:
- This data is posted to the WebForms Server as key/value pairs, where each key corresponds to a field in the Form.
- This data is mapped against the Form XML.
- The Form data (the information that the visitor has filled in) is stored in a separate XML document.
- Any applicable validation rules are applied to the Form data, and if applicable, an error message is returned to the visitor who must then correct the data submitted before being able to proceed.
- If the data is valid, the next Page of the form is generated and displayed.