How to shorten a text field value?
Is there a way we can restrict character length in the form fields so that a user doesn’t enter longer texts?
For context, the form fields are input into a PowerPoint file. We would like to make form fields shorter for this reason.
Is Field: Field Formulas the right action to use in this case? Javascript example in consideration:
https://stackoverflow.com/questions/5454235/shorten-string-without-cutting-words-in-javascript
Is a Field Formula the recommended approach until the Field Validation product enhancement is available in the future?
https://community.pushbot.com/discussion/91
Thank you!
Best Answer
-
@Jozef_783863 What I've done in the past is used the JavaScript slice method:
result = fields["field-name"].slice(0,#)
The # symbol simply need be replaced with the length of the string.
5