Expand my Community achievements bar.

Metadata Schema editor add required for dropdown field

Avatar

Level 2

    I have the requirement to make dropdown field as required property.  So i have overlay the /libs/dam/gui/components/admin/schemaforms/formbuilder/formfields/dropdownfield and updated the dropdownfield.jsp to have required by uncommenting 


    <sling:include resource="<%= resource %>" resourceType="/libs/dam/gui/components/admin/schemaforms/formbuilder/formfieldproperties/requiredfields"/

 

Then i updated the /apps/dam/gui/coral/components/admin/schemaforms/formbuilder/formfields/dropdownfield/dropdownfield.jsp to include  "requiredfields"

 String[] settingsList = {"labelfields", "jsonfields", "metadatamappertextfield", "disableineditmodefields", "requiredfields", "multivalue", "showemptyfieldinreadonly", "orderedlist"};

 

I updated the metadata schema editor to  have required for my dropdown field.  But i when i open the document and add all the required field and save it shows me "One or more required field(s) is/are empty." message.

Any ideas why it is not working? I am using aem 6.2 version.

Thanks!

2 Replies

Avatar

Level 4

Hi, Jaya

You overlay dropdownfiled to /apps folder. Can you please check the path that you used to overlay.

Why did created additional coral folder in the path....

/libs/dam/gui/components/admin/schemaforms/formbuilder/formfields/dropdownfield

/apps/dam/gui/coral/components/admin/schemaforms/formbuilder/formfields/dropdownfield

I recommend you to overlay without changing the structure....

Thanks!

Avatar

Level 2

Sorry for the confusion.  I have overlay 2 different  paths. 

1. /libs/dam/gui/components/admin/schemaforms/formbuilder/formfields/dropdownfield/  to /apps/dam/gui/components/admin/schemaforms/formbuilder/formfields/dropdownfield

2. /libs/dam/gui/coral/components/admin/schemaforms/formbuilder/formfields/dropdownfield to /apps/dam/gui/coral/components/admin/schemaforms/formbuilder/formfields/dropdownfield