Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

mandatory field

Avatar

Former Community Member

Hi,

Is there a way to set a field in a form that unless they fill out that field they cannot fill out the rest of the form?

Thanks!!!

1 Reply

Avatar

Level 2

2 ways of doing this:

  1. You make the rest of the fields wrapped in a subform and then set visibility of the subform so that only when field is non-empty the subform is visible, by setting property :
    • Subform.presence="visible".
  2. You can set the access levels of the fields initially to protected and later only in case field is non-null enable users to edit the fields, using the access property:
    • TextField.access="open";           //"open" to unprotect the fields