Skriv ut siden

Forms

Episerver has a built-in forms generator that enables editors to make custom forms and send the data per email, store the data in Episerver, or send the data to an external solution like Eloqua. 

Most templates and blocks are able to add an Episerver form to a content area. See the template descriptions for more information.

Adding a form to a page (example: Long Page Block)

  1. Open "all properties" of  the block you wish to add a form to
  2. (Optionally) go to the relevant column or content area you wish to add a form to
  3. Press the (...) - button by the xForm-field
  4. Find an existing form and click the "select" button (green checkmark) to add it to your page

Creating a basic form

  1. 1-3 as above
  2. Click the "create" button at the top left of the page
  3. Add a name to the form, choose the folder where the form belongs, and be sure to check the boxes enablig the form to be sent without logging in, and to enable the same person to send the form several times (if required, of course)
  4. Click the "table layout" tab and add the required number of rows to your form by clicking the "add row" button.
  5. Click the "form fields" tab and drag-and-drop a form field to the rows of your form layout.
  6. After adding a field, be sure to add the following data: 
    1. Name (not visible to the user, but used to reference the form data)
    2. Heading (the form field label, shown as placeholder text inside the form fields on the published webpages)
    3. Tooltip (in case the field needs an explanation)
    4. Check the "value must be entered" box if the field is required to submit the form
    5. Optionally, use the "validate as" dropdown to choose a validation pattern for the content (for example, email address).
  7. Press "save" to save the settings to the field
  8. Add more fields as required
  9. Add a button, enter button text, and choose where the form data should be sent.
    1. Save to database: Submissions get saved to Episerver, can be exported as XLS or CSV later
    2. Send email: Sends form data to a specified email address
    3. Send eail and save to database: Combines 1 and 2
    4. Send to specified URL: Sends the data to an external service, like Elpoqua.

 

Best practices for creating forms

When creating a form, the forms generator will allow you to create a table layout for your fields. However, it is strongly recommend to only use a single column for your form fields unless absolutely necessary, since the form won't be mobile friendly. Also, the formatting codes used to style the forms could break your table layout. 

Always use the "heading" field of a form field to add your field label; the text you add in the "heading" field will appear as placeholder text inside the form field element.