Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

 

On This Pagethis page:

Table of Contents
maxLevel1
 

Go To Url

You can forward the user from one  form to another by specifying the URI of the second form in the form action for the first. For example, suppose you have two forms in your application. One named ''formA'' and the other named ''formB''. When the user clicks the submit button on formA you want them to next see formB. In formA you open the form's edit properties and set the form action to "Go to URL" and in the URL property field you put the URI for formB.

...

It is important that both  forms have been made public. If formA is public but formB is not, when the user submits formA they will get a page not found error.

Post and XML Documents

If form A and form B both contain the same data source, and the Form Action in form A is set to '''Post''' to the form Url of form B, then form B's fields from schema will be initialized with the values entered into form 1.

This occurs because the Post request to the Form Server contains the XML document(s) from form A. If one data source was added from XSD schema to form A. Then it will contain two documents. The first is the form's from-scratch document containing elements for all controls added from palette. The second is the schema document.

Form B's from schema document is in the same namespace as form A's since we added the same XSD data source to both. So the values entered into form A's fields will be used as an initial instance document to initialize form B's fields.

See default field values to understand the precedence that XML documents sent in the Post request to form B take over the other possible methods of defaulting form field values.

Url Template Variables

Using Templates

Fields in form B can also be initialized with data from form A using Url Parameters. Imagine form A contains a from palette text control labeled 'Customer Name' with Name property set to 'custName'. And form B has a palette text control labeled 'Full Name' with Name properity set to 'fname'. Using either Form Action Go to Url or Post with the URL set to that of Form B, append &_data=(fname:'{custName}') and when form B loads it's 'Full Name' field will be set to the value entered into form A's 'Customer Name' field.

See initializing via _data Url Parameters in the Initializing Forms with Data section for more details on using _data.Because you many not be in control of what a user enters into a form field used in this way, you should always quote template variables. The only time it is not needed is for numbers but even then it will work with quotes. For example, in the Form Action URL the template variable should have '{name}' quoted as follows: _data=(Name:'{name}').