In-Depth Look into Form Fields and their Settings

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000059251

How to Create a New Form Field When Customizing a Form

To add a new form field to a form, click the Add Field button of the field it should follow:

The Form Builder of a demo form with the Add Field button of the first field highlighted.

A new, empty field appears below that field:

A new empty field highlighted below the field whose Add Field button was clicked.

Clicking the Gear icon (1) displays the field's additional settings (2):

A form field with its Gear icon numbered 1 and the additional settings panel it opens numbered 2.

To enable and require validation rules for a form field, see this article: Toolbox » Form Manager » Field Validation Options

To clone a form field, open its Actions menu (1) and click Clone Field (2). The same menu holds Validation Options and Delete Field.

A form field's Actions menu, numbered 1, open with Clone Field numbered 2 between Validation Options and Delete Field.

In-Depth Look Into Each Setting

In general, customizing forms is not recommended unless handled by a developer. However, these instructions can help with simple changes such as updating field text or adding a basic custom field.

The examples below show each setting in the Form Builder on the left and its result in the Form Preview on the right.

Field Label

Enter the name or label of the field in Field Label (1). It is shown above the field on the form (2).

The Field Label setting numbered 1 and the same label shown above the field in the Form Preview numbered 2.

Database Variable

This setting defines how the field data is stored in the database. It is also the field's name in the form's HTML code.

Important notes:

  • If a field is created without a database variable, submitted data will not be saved.
  • Existing database variables should not be changed unless the consequences are fully understood.

The database variable is entered here:

The Database Variable box of a form field highlighted.

Database variables must use lowercase letters only, contain no spaces, and use underscores for multiple words.

All database variables must be unique. When two fields of a form share a database variable, clicking Save Changes shows Error! Database Variable Name must be unique, marks the second field with Database Variable Name is duplicated, and nothing is saved. A form that already holds duplicate variables also shows a warning at the top of the Form Builder naming them:

An Error! message saying Database Variable Name must be unique, over a form where two fields share a variable, with a warning bar naming it and the second field marked as duplicated.

Type of Field

Select one of the available field types in Type of Field:

The Type of Field dropdown of a form field highlighted.

For a detailed explanation of each option, see In-Depth Look Into Each Field Type.

Required Field

This setting determines whether the field must be completed before the form can be submitted (1). When it is on, a red asterisk appears next to the field label on the form (2).

The Required Field switch turned on, numbered 1, and the red asterisk beside the field label in the Form Preview, numbered 2.

Placeholder Text

Enter example text to be displayed inside the field as a placeholder (1). It shows in the empty field on the form (2).

The Placeholder Text setting numbered 1 and the placeholder text inside the empty field in the Form Preview numbered 2.

Field Help Text

Enter text in this section to display it below the field (1, 2).

The Field Help Text setting numbered 1 and the help text shown below the field in the Form Preview numbered 2.

Default Field Value

Enter a pre-filled value that appears inside the form field by default:

The Default Field Value setting of a Company field highlighted, holding Pre-filled default value.

On the form, the field starts with that value:

The Company field in the Form Preview starting with the text Pre-filled default value.

The difference between Placeholder Text and Default Field Value: if a visitor submits the form without changing the field, the placeholder text is not saved, while the default field value is saved in the database.

Addtl. Field CSS Class

Add custom CSS classes to the field in this section to change its design. This is mainly useful for developers and web designers; it is best left empty without some familiarity with CSS.

To gray out a field so it cannot be changed, add readonly to its classes (for example form-control readonly). On the website the field gets a gray background and visitors cannot click into it.

The Addtl. Field CSS Class box of a Name field highlighted, holding form-control readonly.

Outer Element ID

Add a custom ID to the element that wraps the field. This is especially useful for developers and web designers, as it allows for applying additional CSS styling or custom scripts to this specific form field.

The Outer Element ID box highlighted, holding test_field.

Input View

This setting controls whether the field is displayed on the form. If it is turned off, the field does not appear on the form. This can be useful for fields that may be needed in the future but are not yet ready for members to fill out.

The Input View switch in a field's Display Settings highlighted.

Lead forms: on a lead form such as Website - Lead Form - Get Matched, the Lead Map field (Field Label [widget=Bootstrap - Contact Member Lead Map]) and the Category Dropdowns field (Field Label [widget=Bootstrap - Contact Member Category Dropdowns]) cannot have their Input View turned off while the Lead Settings mark the location or the categories as Required. Clicking Save Changes then shows a message and nothing is saved. For the Lead Map field it reads:

Location Field Is Required — The Lead Settings mark the Location field as Required, so its Input View cannot be turned off. Turn it back on, or make it not required in the Lead Settings first.

A Location Field Is Required message in the Form Builder of the Get Matched lead form, shown after the Lead Map field's Input View was switched off while Lead Settings require a location.

For the Category Dropdowns field the message is titled Category Field Is Required and names the Category field. To hide either field, first make it not required under Interactions » Member Leads » Lead Settings (see Member Leads » Lead Settings » Lead Form), then save the form. A lead form that already has one of these fields hidden while it is required cannot save any other change until the field's Input View is turned back on or the requirement is turned off in the Lead Settings.

The Form Builder makes this check on a lead form the website has already customized. The first save that customizes a default lead form does not make it, so when customizing the Get Matched form for the first time, leave the Lead Map and Category Dropdowns fields shown while the Lead Settings require them.

Below each display setting is an Alt. Field Label box, which gives the field a different label for that view. In this example, the field label is Courses (1). On the form (Input View) it is renamed Completed Courses (2), and on the website's display pages (Display View) it is renamed Latest Courses (3). The other views (Lead Previews, Include in Emails, Table View) are left empty, so they use the main field label.

A Courses field with its Field Label numbered 1 and Alt. Field Label boxes for Input View and Display View numbered 2 and 3.

The form shows the Input View label:

The Form Preview showing the field labelled Completed Courses, its Input View label.

Below the Input View is the Admin Only checkbox. When it is ticked, only the admin of the website can view and edit this field when entering data, not the members.

The Admin Only checkbox below the Input View highlighted.

Note: a field cannot be both Required Field and Admin Only. Clicking Save Changes with both set shows Error! Fields marked as "Admin Only" cannot be "Required" and the form is not saved.

An Error! message saying fields marked as Admin Only cannot be Required, over a required field with Admin Only ticked.

Display View

This setting controls whether the data entered in the field is displayed on the front end of the site.

The Display View switch in a field's Display Settings highlighted.

This setting does not apply to all forms. For example, turning it on or off for the Contact Us form makes no difference, as there is no front-end view for this form on the site after it is submitted. It does apply when a custom field is added to a feature form like Classifieds or a member form like Contact Details. A good example of this setting is in the article How To Display Custom Post Fields In The Post Details Page.

A website link can also be displayed as a button. When Type of Field is Website URL (1), button options appear under Display View (2): the Link Text shown on the button and a button style, such as Primary Button. Open New Tab (3) opens the link in a new browser tab.

A Website URL field with Type of Field numbered 1, the Link Text and button style under Display View numbered 2, and Open New Tab numbered 3.

Lead Previews

This setting controls whether the data entered in the field is displayed in lead previews. When it is on, the information is visible when members review leads; when it is off, the data stays hidden from lead previews.

The Lead Previews switch in a field's Display Settings highlighted.

This setting applies only to lead forms like Website - Lead Form - Get Matched. If it is on and the member is set to receive a preview email when a lead is submitted, the field is included in that email, as shown below:

A lead preview email listing the lead's fields, including a custom field and its value.

This can be helpful when the site owner does not want to share all the details of a lead, to encourage the member to visit the website or even purchase the lead.

Include In Emails

If this setting is on, the field's data appears when the form is rendered in an email and for accepted leads. If it is off, the information is not included in lead previews or email notifications.

The Include In Emails switch in a field's Display Settings highlighted.

A good example for this setting is the Contact Us form, which sends an automated email to the admin of the site when it is submitted.

To include a field in an email template, edit the email template and add the field's database variable between percentage signs, for example %field_label%:

An email template body with the line Field Label: %field_label% highlighted.

Table View

This setting makes the field label and content visible on the Admin Dashboard.

The Table View switch in a field's Display Settings highlighted.

This setting only works with the following forms:

  • Website - Lead Form - Get Matched
  • Listing - Write Review