Show all the mandatory fields at the end of the form

Certified Associate Developer

Hi,

I have a requirement which says, when a mandatory field is missed, there should be an error displayed at the bottom of the page with the missed field name so the user can see what has been missed without having to scroll up the page. Could anybody please suggest what's the best approach?

Thanks

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer
    You can use the validations attribute of a!formLayout() as this will appear at the bottom. If not using a!formLayout() just drop a section at the bottom of your components that just has the validations value in there.
    You will have to test each field manually using isnull() or similar but if you wrap your error messages in a!validationMessage() you can choose to only have them fire on SUBMIT.
Reply
  • +1
    Certified Lead Developer
    You can use the validations attribute of a!formLayout() as this will appear at the bottom. If not using a!formLayout() just drop a section at the bottom of your components that just has the validations value in there.
    You will have to test each field manually using isnull() or similar but if you wrap your error messages in a!validationMessage() you can choose to only have them fire on SUBMIT.
Children
No Data