Hi Team,
I have to limit the character for a text field inside a multi field. I'm using 6.5 SP. I have tried to "max String 3" in property level and it doesn't work.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @JakeCham,
According to documentation you should use maxlength property to restrict number of chars.
Here is very simple example that presents text filed with length limitation inside multi filed. I have tested it on AEM 6.5.11 but it should work on any other AEM 6.5 version.
<cq:dialog jcr:primaryType="nt:unstructured" jcr:title="Properties" sling:resourceType="cq/gui/components/authoring/dialog"> <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> <items jcr:primaryType="nt:unstructured"> <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <multi jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/multifield"> <field jcr:primaryType="nt:unstructured" maxlength="3" name="./value" sling:resourceType="granite/ui/components/coral/foundation/form/textfield"/> </multi> </items> </column> </items> </content> </cq:dialog>
Hi @JakeCham,
According to documentation you should use maxlength property to restrict number of chars.
Here is very simple example that presents text filed with length limitation inside multi filed. I have tested it on AEM 6.5.11 but it should work on any other AEM 6.5 version.
<cq:dialog jcr:primaryType="nt:unstructured" jcr:title="Properties" sling:resourceType="cq/gui/components/authoring/dialog"> <content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> <items jcr:primaryType="nt:unstructured"> <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <multi jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/multifield"> <field jcr:primaryType="nt:unstructured" maxlength="3" name="./value" sling:resourceType="granite/ui/components/coral/foundation/form/textfield"/> </multi> </items> </column> </items> </content> </cq:dialog>
Views
Likes
Replies