Requirement:
- Limit the number of characters sitecore single line text field
- While editing(not while saving) in experience editor should not allow more than the limit mentioned.
- Field should be shown with sub line text (title text should show the details about the limitation)
Example: If the sitecore single line text field is limited to 30 characters, While editing in the experience editor should not allow more than 30 characters and will also sub line (this field will not allow more than 30 characters)
Please provide preferred approach to fulfill this
I think you should create Sitecore custom field with javascript to achieve that,there are some blog posts talking about that:
https://www.sitecore.net/company/blog/474/creating-a-custom-sitecore-field-4246
https://www.geekhive.com/buzz/post/2014/05/how-to-create-a-custom-field-in-sitecore/
I have done that before with "Sitecore Tags Field", which is custom field and i am using javascript to get list of available tags, i am sure you don't need that but you can see how i am using javascript with that code, you can check my blog post here:
https://abarhoum.wordpress.com/2017/07/06/sitecore-tag-field-tags-and-autocomplete/
i have uploded the code on github as well:
https://github.com/abarhoum/TagControl