Hi all,
Ive got a form and i’m using Formit in REVO 2.1.2.
[[!FormIt?
&hooks=`spam,email,redirect`
&emailTpl=`emailTpl`
&emailTo=`[email protected]`
&redirectTo=`8`
&errTpl=`[[+error]]`
&store=`1`
&language=`nl`
&validate=`email:required:email`]]
because i want the error messages to appear in the inputfield and disappear when the user starts typing i’ve got this
<input type="text" name="email" id="email"
value="[[+fi.error.email:isnot=``:then=` [[+fi.error.email]]`:else=`[[+fi.email]]`]]"
[[+fi.error.email:isnot=``:then=`class="warning"`]]
onClick="errorClear(this,'[[+fi.error.email]]')"
/>
The javascript empties the value and removes the warning class. that works fine
Now when i look at the HTML that is generated it looks like this
<input type="text" name="email" id="email"
value="Het veld is verplicht."
class="warning"
onClick="errorClear(this,' Het veld is verplicht.')"
/>
Notice the whitespace BEFORE the error massage in the javascript call in ’errorClear’
Can anyone explain why this is??? and even more how to get rid of it?
The error message itself has no leading whitespace in the lexicon file.
tnx
Ralph