Skriv ut siden
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)
- Open "all properties" of the block you wish to add a form to
- (Optionally) go to the relevant column or content area you wish to add a form to
- Press the (...) - button by the xForm-field
- Find an existing form and click the "select" button (green checkmark) to add it to your page
Creating a basic form
- 1-3 as above
- Click the "create" button at the top left of the page
- 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)
- Click the "table layout" tab and add the required number of rows to your form by clicking the "add row" button.
- Click the "form fields" tab and drag-and-drop a form field to the rows of your form layout.
- After adding a field, be sure to add the following data:
- Name (not visible to the user, but used to reference the form data)
- Heading (the form field label, shown as placeholder text inside the form fields on the published webpages)
- Tooltip (in case the field needs an explanation)
- Check the "value must be entered" box if the field is required to submit the form
- Optionally, use the "validate as" dropdown to choose a validation pattern for the content (for example, email address).
- Press "save" to save the settings to the field
- Add more fields as required
- Add a button, enter button text, and choose where the form data should be sent.
- Save to database: Submissions get saved to Episerver, can be exported as XLS or CSV later
- Send email: Sends form data to a specified email address
- Send eail and save to database: Combines 1 and 2
- 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.