Skip to content

Contact

Now that you have created your first webform as shown in Getting Started and have added some elements as shown in Basic Webform let us explore the elements of the CiviCRM configuration form in more detail.

Contact Fields

The first thing you will want to do is specify the number of contacts to include in your webform by using the dropdown list under the label Number of Contacts. This will result in a corresponding number of fieldsets for each contact.

alt screenshot of webform civicrm settings page

For each contact you will want to specify the Contact type, a Label, and which Contact Fields appear in your webform.

The available contact types are: Individual, Household, and Organization.

Contact type determines which Contact Fields are available for inclusion in your webform. For example, a Job Title field is available for a contact that is an Individual, but is not available for a contact that is a Household or an Organization. An overview of contact types can be found at Contacts

Existing Contact

This is available for the Individual, Household, and Organization contact types.

Enabling the "Existing Contact" field gives you many options for how a contact can be autofilled or selected:

The following settings can be found by clicking on the Build tab, then clicking on Edit button associated with the Existing Contact element. When you do so, a panel will open with the following options.

alt screenshot showing navigation to edit Existing Contact

Form Widget: Allows you to determine whether to expose this field to the form as an autocomplete or select element, or hide it and set the value yourself.

alt screenshot of Existing Contact settings

Default Value: You can have this contact pre-selected on the form based on the current user, relationships, or other options. This option will be overridden if a valid contact id is supplied in the url (see section on autofilling via url below).

alt screenshot of Existing Contact settings

Filters: Limits the list of available choices from which this contact may be autofilled or selected. Note: The "enforce permissions" filter is enabled by default and will verify that the acting user has permission to view and edit a given contact. In rare cases you will wish to disable this permission check, for example to display a list of schools. You'll generally want to combine doing so with some filters or node-based permissions on the webform. Only disable "enforce permissions" if you know what you are doing! Also note that, as of CiviCRM 4.2 and later, if you want the 'permissions' check to evaluate contact relationships correctly, you must download and enable the Related Permissions CiviCRM extension, which makes permissioned relationships behave like ACLs. This allows, for example, an authenticated user to use the autocomplete widget to search for contacts, but the search will be limited to those contacts for which a permissioned relationship exists in CiviCRM. To enable CiviCRM extensions, refer to the CiviCRM documentation.

alt screenshot of Existing Contact settings

Show/Hide fields: When an existing contact is selected, you can control which fields the user is allowed to edit and which will be hidden. For example, hiding a contact's name fields will only show them when "Create New Contact" is selected, and makes for a nice select/add combo UX which keeps contacts from getting accidentally renamed.

alt screenshot of Existing Contact settings

Name Prefix

This field is available for the Individual contact type and results in a drop-down list for your webform.

Information about Name Prefix can be found at Individual Fields, including how to add and remove values from the dropdown list.

First Name

This text field is available for the Individual contact type and is one of the core fields associated with an Individual contact record.

Middle Name

This text field is available for the Individual contact type.

Last Name

This text field is available for the Individual contact type and is one of the core fields associated with each Individual contact record.

Name Suffix

This field is available for the Individual contact type and results in a drop-down list for your webform.

If you can't find the value you want, you can add more options to the list from Administer > Customize Data and Screens > Dropdown Options > Individual Suffixes (Jr., Sr...).

Nickname

This text field is available for the Individual and Organization contact types.

Gender

This field is available for the Individual contact type and results in a drop-down list for your webform.

If you can't find the value you want, you can add more options to the list from Administer > Customize Data and Screens > Dropdown Options > Gender Options.

Job Title

This text field is available for the Individual contact type.

Birth Date

This field is available for the Individual contact type and results in a date-picker for your webform.

Preferred Communication Method(s)

This field is available for the Individual, Household, and Organization contact types.

Privacy Preferences

This is available for the Individual, Household, and Organization contact types.

Preferred Language

This is available for the Individual, Household, and Organization contact types.

Contact ID

This is available for the Individual, Household, and Organization contact types.

User ID

This is available for the Individual, Household, and Organization contact types.

External ID

This is available for the Individual, Household, and Organization contact types.

Source

This is available for the Individual, Household, and Organization contact types.

Checksum

This is available for the Individual, Household, and Organization contact types.

Current Employer

This is available for the Individual contact type.

Is Deceased

This is available for the Individual contact type.

Deceased Date

This is available for the Individual contact type.

Existing Contact

This is available for the Household contact type.

Household Name

This is available for the Household contact type.

Organization Name

This text field is available for the Organization contact type and is one of the core fields associated with an Organization contact record.

This is available for the Organization contact type.

SIC Code

This is available for the Organization contact type.

Matching Rule

Enable Tags and Group Fields

etc..