Closed loxy closed 8 years ago
Could you give me an example FormIt call?
[[!FormIt?
&hooks=`math, email`
...
&mathMinRange=`10`
&mathMaxRange=`100`
&mathField=`fmath`
&validate=`fmath:required, ...
]]
...
<div class="form-group [[!+fi.error.fmath:isnot=``:then=` has-error`]]">
<label for="fmath" class="col-xs-3 control-label">What is [[!+fi.op1]] [[!+fi.operator:is=`-`:then=`minus`:else=`plus`]] [[!+fi.op2]]?*</label>
<div class="col-xs-9">
<input type="text" class="form-control" name="fmath" value="[[!+fi.fmath]]" placeholder="Result" />
[[!+fi.error.fmath]]
<input type="hidden" name="op1" value="[[!+fi.op1]]" />
<input type="hidden" name="op2" value="[[!+fi.op2]]" />
<input type="hidden" name="operator" value="[[!+fi.operator]]" />
</div>
</div>
Your test works here. Did you've add some custom hooks, validators? Could you do a quick test with your own example code?
I checked the latest version 2.2.6. The same problem. No custom hooks or validators...
Hi @loxy I've located and fixed the problem with the empty math operator. The fix will be merged into our next release (2.2.9) which is scheduled for the end of this week.
Nice!
Hi,
after a successfull form submission with consequent page reload all hidden math fields are empty. See forum for more information: http://forums.modx.com/thread/85683/math-fields-are-empty-after-form-submission
So this is the flow:
It appears in: -MODX 2.2.15 on PHP 5.5 -MODX 2.3.2 on PHP 5.6
Any ideas how to fix it?
Best regards, Kersten