Expand my Community achievements bar.

SOLVED

How to limit character count in the title field in the create page wizard

Avatar

Level 3

How can we limit character count in the title field when creating a page in the Touch UI, AEM 6.2? The create page wizard renders it via the cq:dialog node of the page properties dialog of the template's component, but I don't see where to add the js validation in the code. Thanks.  

1 Accepted Solution

Avatar

Correct answer by
Level 3

Thanks - but here are the steps that I was looking for validating the title field in the "create page wizard":

1. Go to CRXDE and copy the /libs/foundation/components/page/cq:dialog node up to your own base page component

2. Then under the copied cq:dialog node go to cq:dialog/content/items/tabs/items/basic/items/column/items/title/items/title

3. Set the property maxlength of type Long with value to whatever you want to restrict it to

4. Save

5. Refresh the UI and try to create a page and see that now the title field length is restricted

Also, just to test and see that this solution works you could first try setting maxlength on the node under /libs/foundation/components/page/cq:dialog/content/items/tabs/items/basic/items/column/items/title/items/title

View solution in original post

2 Replies

Avatar

Administrator

Hi 

Wish you a very happy new year.

Please have a look at this similar forum post:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

//  Live character counter for title and meta description (SEO - search engine optimization) in AEM

    Classic UI:

    Add MaxLength and MaxLengthText properties to the text field and textarea nodes. you can find description to the properties on bellow link.

    https://docs.adobe.com/docs/en/cq/5-6/widgets-api/index.html

    TouchUI:

    Add MaxLength propertie to the text field and textarea nodes. you can find description to the properties on bellow link.

    https://docs.adobe.com/docs/en/aem/6-1/ref/granite-ui/api/jcr_root/libs/granite/ui/components/founda...

    https://docs.adobe.com/docs/en/aem/6-1/ref/granite-ui/api/jcr_root/libs/granite/ui/components/founda...

 

Also 

    Link:- http://letsaem.blogspot.in/2015/12/implement-character-countdown-and.html

    // You can create a listener (Classic UI) where you can trigger alert message . For Touch UI refer to http://experience-aem.blogspot.in/2015/02/aem-6-sp2-touch-ui-sample-dialog-ready-event-listener.html

 

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Correct answer by
Level 3

Thanks - but here are the steps that I was looking for validating the title field in the "create page wizard":

1. Go to CRXDE and copy the /libs/foundation/components/page/cq:dialog node up to your own base page component

2. Then under the copied cq:dialog node go to cq:dialog/content/items/tabs/items/basic/items/column/items/title/items/title

3. Set the property maxlength of type Long with value to whatever you want to restrict it to

4. Save

5. Refresh the UI and try to create a page and see that now the title field length is restricted

Also, just to test and see that this solution works you could first try setting maxlength on the node under /libs/foundation/components/page/cq:dialog/content/items/tabs/items/basic/items/column/items/title/items/title