Webform is an easy way to create web forms in the Enterprise Intranet.
A web form is created by adding the Enterprise Webform web part directly on the page where you want it. Then, by editing the web part, you can design the form as you like it.
The Webform designer offers a drag'n'drop functionality, so it is easy to create your own personal webform. The webform may contain different types of fields such as simple text fields, radio buttons, dropdown lists etc. You simply drag fields from the toolbox to the form and organize them as you wish.
When the users have filled out and submitted a web form, the data is saved in a SharePoint list of your choice.
Adding the Webform web part to a page
To add the web part to a page, edit the page and click "Add a Web Part" in the zone where you want the form to be:
Now choose the Webform web part in the Wizdom365 V2 category in the web part gallery, and click "Add".
Configuring the form
Once the web part is placed on the page, click "Edit Webpart".
The "Edit Webpart" page has to tabs: the Webform and the List tabs. The Webform tab shows the Web Form Designer, and the List tab is where you specify in which list to save the data, when users has filled out and submitted the form.
The Web Form Designer
The Web Form designer is divided into three sections, "Toolbox", "Form" and "Field settings". You drag fields from the toolbox to the Form and then configure the field details in the "Field settings" area.
Rows and columns
The form is divided into rows and each row is divided into columns. To add a row click "Add row", and to edit a row click "Edit". You can now change the number of columns in the row.webform_editrow.png
You add a field of a given type by dragging it from the toolbox and dropping it in the column where you want it. You can now specify the field details by clicking "Edit" on the field. In the example below a "Textbox" field is placed in the left hand column:
When you have changed the field settings for a given field, click the "Update button".
The different field types have different settings options. Each field type is described in the "Field types" section below.
You can add as many fields to the form as you like.
In the list settings you can specify in which list to save the data when users have submitted the form. Specify the list name and click "Save" to save all the web part information.
When you click "Save" the Webform web part will automatically create the list and add the fields corresponding to the fields you have added with the Form Designer.
The simple form that we have now created contains only one field "Name" of type "Textbox". When we save the web part settings and publish the page, the form will look like this:
and a list with the field "Name" of type "Text" is created in the site where the Webform page is created. If a user writes the name "John Doe" in the field and clicks "Submit", an item is added to the list with the content "John Doe" in the field "Name":
NOTE: Please be aware that the user must at least have 'Contribute' permissions to submit the form properly.
Below, each supported field type is described along with the customization options for it.
Some field settings are available for all or most field types. These are:
The Label is the field's headline in the web form. It is also the name of the field in the SharePoint list where the data is saved
The Required option is available for all field types except the Checkbox type.
If a field is required it is not possible for the user to submit the form until this field is filled out.
Required fields are marked with a asterisk:
The placeholder text is available for fields where the user is supposed to type in text. It may be used as a guide for the user in regards to what kind of information the field is supposed to contain.
In the example above "Enter your name" is the placeholder text.
The default value is available for several field types. If a default value is specified the form will contain this value when shown. The user may keep the default value or change the value to something else before submitting the form.
Textbox is a simple text input field. Field settings for this field includes:
The validation expression may be used to require that the data meets a specific format, eg. an email address or a file name.
The user cannot submit the form until this format is met.
Each validation expression corresponds to a regular expression.
When a format is selected the regular expression is available as shown here:
The regular expression may be customized for this specific field before saving the field settings.
The error message is the message shown if the field does not meet the validation requirements.
The Checkbox field is the most simple field type. It has only a label and a default value. The value may be true or false.
The Checkbox list is a field that may contain multiple predefined values.
When presented in the form, the field looks like this:
The Email field is just a text field with email validation (depending on browser support) (HTML5 <input type="email">).
The Number field is a field that can only contain numbers. Besides the generic settings options as Label, Placeholder text, Required and Default value, it may also be configured with a minimum and maximum value:
If the min. and max. values are not met, the user cannot submit the form.
The password is a special version of the textbox field. When typing data into the form the data in this field are not shown:
The Dropdown field shows a list of selectable values as specified in the "Possible values" field in Field settings:
In the web form it may look like this:
Specify the valid options for the Radio button type field in the "Possible values" field:
to make it look like this in the web form:
The Note field is multiline text field that also has the option of being in HTML format:
If HTML is specifiied, the user gets a simple HTML editor when filling out the field:
The Users field add a User or Group picker to the form. It is possible to specify whether users, groups or both may be selected, and also if multiple selections are possible,
Date and Time
For the Date and Time field the following options are available:
The Taxonomy field enables the user to select one or more values from one of the term sets defined in SharePoint. Select one of the termsets displayed in the list:
The Attachment field allows the user to attach one or more files to the form response. On submission of the form the attached files are attached to the list element containing the submitted data.
In the web form the user gets a download icon making it possible to select the file(s) to attach:
NB: In the current version of webform, attaching a file may fail like this:
The most likely reason for this is that the file the user is attempting to attach is too big.
It is possible to specify a larger maximum request value in the web.config file, as in this example
<httpRuntime executionTimeout="100000" maxRequestLength="214748364" />