I am trying to edit the Formit lexicon so that "This field is required" will instead read "Name is required" (for instance). This is so that I can bunch the errors together at the top of the page instead of putting them by each field in the form. Taking a clue from another lexicon entry, I tried "[[+field]] is required" but that came out with blank space where the field name should have been. Is there any way to do this? Thanks.
Jason
-
☆ A M B ☆
- 2,475 Posts
If there’s not a way to do that, it’d make a great feature request...
Did you try [[+fieldName]] or [[+fi.fieldName]] in your form? Whatever is used for the caption in the form should be available for use in the error message line.
-
☆ A M B ☆
- 2,475 Posts
I think Bob meant for you to put those placeholders in the relevant form chunk, not the Lexicon.
Quote from: kenquad at Dec 08, 2010, 11:58 AM
Quote from: Everett at Dec 08, 2010, 11:56 AM
I think Bob meant for you to put those placeholders in the relevant form chunk, not the Lexicon.
It almost sounded like that and maybe I’m a little dense today, but where would I put them? Concatenated with the error messages? How would the parser know which was which?
Good point. It would show all the time unless you used a separate placeholder for it and I’m not sure how you’d set it. Shaun might have an idea.
I’d love to file a feature request for field names in error messages. How do I get set up to file one on your Github?
Jason
You get a GitHub account and file one, I think.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com