Hidden and custom fields
It's important to have a stored_ prefix in the field name,
otherwise it will not be added into the payment object.
Adding hidden fields
If you need to add a hidden fields to a transaction just add it
to the paymentFormPrefill config option.
This field will be added to a transaction with a value 'my value'.
Adding custom fields into slots
As described in the Dynamic components guide,
the one of the component supported types is field.
You can use it to add a custom fields of various types into the form.
Supported types for a field component are:
texttextareadateradio-groupradio-in-groupcheckbox-groupcheckbox-in-groupcheckboxselectselect-salutationsselect-countriesselect-states
You can define default values for custom fields using paymentFormPrefill config option:
All custom fields can be validated the same way as Tamaro standard fields with the same validation rules. You need to specify desired validation rule for them using paymentValidations config option:
Adding a text, textarea, date fields
In the example below:
- A custom text field
stored_custom_text_fieldis added to theprofile_form_startslot. - The field is required since we added a validation rule.
- When supporter clicks on the info-icon with "Show more info" aria-label, the HTML content is expanded with specified content.
Adding a radio-group and radio-in-group fields
In the example below:
- A custom radio group fields
stored_contact_viaare added to theprofile_form_startslot. - The field is required since we added a validation rule.
Adding a checkbox-group and checkbox-in-group fields
In the example below:
- A custom checkbox group fields
stored_contact_viaare added to theprofile_form_startslot.
Adding a checkbox fields
In the example below:
- A custom checkbox field
stored_customer_accept_termsis added to the customslot_1block. - The field is required since we added a validation rule.
Adding a select fields
In the example below:
- A custom select field
stored_contact_viaare added to theprofile_form_startslot. - The field is required since we added a validation rule.
Adding a select-salutations, select-countries and select-states fields
In the example below:
-
A custom fields
stored_member_salutation,stored_member_countryandstored_member_stateare added to the customslot_1block. -
The fields are required since we added a validation rules.
-
The fields
stored_member_statedepends on the value of thestored_member_countryfield, it's shown only when selected country has some defined states, which is currently defined only for:- United States of America
- Canada
- Chile
- Argentina