Repository navigation
Highlights
You can now choose which form fields the widget sends to verifyUrl when serverVerificationFields is enabled. Email fields are now included by default.
New Features
serverVerificationFieldsSelector
A CSS selector for the form fields whose values are sent in the server verification request.
- Default:
'input[type="text"]:not([data-no-spamfilter]), input[type="email"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])' - Fields that are not part of the widget's form are never collected. This includes controls linked to the form with the
formattribute.
widget.configure({
serverVerificationFields: true,
serverVerificationFieldsSelector: 'input[type="text"], input[type="tel"], textarea'
});serverVerificationFieldNames
A list of field names to send in the server verification request. When the list is not empty, it overrides serverVerificationFieldsSelector. Names match any form control (input, textarea, select), and the data-no-spamfilter attribute does not exclude them.
- Default:
[]
widget.configure({
serverVerificationFields: true,
serverVerificationFieldNames: ['email', 'message']
});Behavior Changes
- The default selector now includes
input[type="email"]. If you enableserverVerificationFieldsand keep the default selector, email field values are now sent toverifyUrl. To keep a field out, add thedata-no-spamfilterattribute to it, or setserverVerificationFieldsSelector/serverVerificationFieldNamesyourself.
Upgrade Notes
- Nothing changes if
serverVerificationFieldsis disabled. It is disabled by default. - To keep the previous behavior exactly, set:
widget.configure({
serverVerificationFieldsSelector:
'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])'
});