Afform: 'required' fields not handled correctly
View options
- Truncate descriptions
Overview
When configuring an Afform submission form, required fields are shown with an asterisk, but when the form is displayed there is no indication of fields being required.
Submitting the form with a missing required field fails without error.
Configuration page - required fields are indicated:
Display page - required fields are not indicated:
Reproduction steps
- Install https://lab.civicrm.org/extensions/certifications on master
- Go to
Certifications > New Certification Type
, create a type as eg name: First Aid, validity: 3 years - Go to
Certifications > New Certification
, select the type & a contact but leave the date empty - Hit submit - goes to listing of all Certifications & is still empty
Current behaviour
Currently, the 'submit' button appears to work normally but no Certification is created.
Expected behaviour
The form contents should be preserved and the missing required field highlighted somehow.
The user should be able to fill in the missing field and hit 'submit' to process.
Comments
- Show labels
- Show closed items