Automated (optional) marking of fields & GDS style default error messages option

Combined work on:

Add '(optional)' to the titles of elements on a webform that are not required.

To test use the branch, and then go to /admin/structure/webform/config and check the Third Party setting image

  • Expected behaviour (optional) added to the titles of elements that aren't required. Will also work with conditionals.
  • Undesirable behaviour to look-out for: there might be elements that need to be excluded from the automated change (at the moment this is single checkboxes and radios, and every element of an address if all elements are optional -- but there might be, probably are, more we want to exclude).

There's another third party setting image which will default the required error message to 'Enter {a|an} {strtolower(field_title)}' if no custom error message has been set.

Edited by ekes

Merge request reports

Loading