Custom fields basics
TotalPoll allows you to have additional fields under poll questions in order to collect information such email, name and other from end user.
Available custom fields#

- Text: Simple text field.
- Textarea: Text field with multiple lines.
- Select: A dropdown menu.
- Checkbox: Choices with multiple selection.
- Radio: Choices with one selection.
Basic settings#
The basic settings are used to define field properties such name, label, default value, options and more.

Name: The name of the field (i.e. email_address).
Label: The title of the field (i.e. Email Address).
Default Value: The initial value of the field.
Validation rules#
Validations rules are essential to avoid spam entries and collect only validated information. These are available validation rules in TotalPoll:

Filled: The field must be filled (i.e. required).
Email: The field must contain a valid email address (i.e. [email protected]).
Unique: The field value must be unique in the database.
Filter by list: Allow or deny specific words where the input of the user should satisfy.
Regular expression: The field value should satisfy a regular expression.
HTML settings#
Usually, customizing plugin generated markup requires injecting some code but thanks to these settings, you're able to customize it directly from the interface.

Field CSS Classes: You can set CSS classes of the input element (i.e. email-field form-control
).
Label CSS Classes: You can set CSS classes of the label (i.e. email-label form-control-label
).
Template: You can use {{label}}, {{errors}} and {{field}} variables for customizing the template. Useful for markup customization (i.e. <div class="form-group">{{label}}{{field}}{{errors}}</div>
).