I have setup a vanilla installation of Formz.
I first applied some work arounds to make formz usable. these were:
Stop valid field data from disappearing after the form has been submitted but returns errors
In fieldTypesTpl I changed the input value from
value="[[+current_value:default=`[[+default]]`]]"
to
value="[[+fi.[[+name]]]]"
Show validation messages on the front end which were entered via the Formz CMP
I replaced
[[+error:notempty=`<span class="[[+error_class]]">[[+error]]</span>`]]
in fieldWrapTpl with the below to output the error messages:
[[!+fi.error.[[!+name]]]]
The final problem!
What I can't understand, is why the error message placehoders are empty inside the inputs (specifically [[+class]] & [[+error_class]]). Also, why don't the default error placeholders work?
<input type="[[+type]]" name="[[+name]]" id="[[+key]]" value="[[+current_value:default=`[[+default]]`]]" class="[[+type]] [[+class]][[+error_class]]" size="[[+size:default=`40`]]" />
If this worked as intended, if a user made a mistake with the form, I could highlight the input that needs correcting via a css class name ...
Not sure if this is a Formz, FormitFastPack or Formit issue - any help would be appreciated!!!
[ed. note: jonleverrier last edited this post 8 years, 5 months ago.]