In the Pages editor you can change which fields appear in the Contact block, and are added to the database with a transaction. You can make existing fields optional, required, read-only, hidden and provide a default value. You can reorder the fields on the form, and you can replace the default ones with custom fields.
From the Pages editor, select the Contents tab and then the Contact Options tab.
This shows the configuration of the contact block for the form. The fields are shown in the order given, except for Inactive or Hidden ones. You can reorder the fields using the common table controls on the right-hand side.
To change the definition of the field, select the edit icon on the right-hand side of the row containing the field:
The Field Mapping dropdown controls how the field is used on the form, the options are:
- Inactive - the field will not appear on the form, and no data will be added to that Contact field in the database
- Hidden - the field will appear on the form, and if the default value is set, it will be set as the value for that field for the contact in the database
- Optional - the field will appear, but will not be required
- Required - the field will appear and be required
- Readonly - the field will be readonly
Why do we allow for Hidden and Readonly fields? So that you can pre-define values for fields that will be entered in the database for the Contact. For example, you would make State readonly with your organization's state as the default value.
The next set of options control the appearance of the field:
- Prompt on Page: the label that will appear alongside the field.
- Default value: a default value to be set in the field when the form appears.
- Auto correct: will apply rules to input data to normalize them - correcting all-upper or all-lower case, for example.
- Show on confirmation: whether the field is part of the contact block as it appears on the confirmation page and email.
The last option controls whether the field replaces a pre-defined contact field. More on that later.
As an example, let's enable an optional nickname, make the State field read-only with a value of "OH", and remove the phone number. Let's also make the labels a little more friendly:
Adding and Replacing Contact Fields
- Adding custom fields to contacts
- Replacing input text fields of contacts with dropdowns
From here you can add fields that will be added to every contact in your database. To create a new dropdown field, select the Create Custom Field button and then select Custom Field Dropdown from the select at the top of the popup:
We'll create a new Title field in this example to replace the default input text box. Note that we named the field "My Title" to distinguish it from the default title field. We also made the field hidden by default. If the field is defined as Required, it will be added to all existing and new forms as a required field. If it is not hidden, it will automatically be added to all existing and new forms as an optional field. Making the field hidden allows us to pick and choose which forms it will be used on.
When we create a dropdown field, we are taken to the editor for the field to set its values. On the Values tab we can start creating values for the dropdown:
Once the field and account have been saved, the new field is automatically added to our existing and new Pages:
To have this field replace the given Title field, we enable it, and set that it replaces the Title field:
Let's change it's prompt to be nice like the others and move it to the top of the form, and we now have a custom Title dropdown: