Can anyone help or provide a working form that uses &submitVar?
I’m using the latest version of Modx and all extras are up to date.
Thanks for any help
Janice
Also, according to the documentation “Multiple forms should be used with INPUT type=“submit” […] button elements have been reported not working.”
I believe you can use a hidden field instead, but the value attribute can’t be empty.
@halftrainedharry - Thank you!! That is indeed how it’s meant to be written. I’d seen the threads about having a hidden input but had not realised it should not appear on the button tag also.
Side-node: it is possible to put it on the button, but you have to give it a value: <button type="submit" name="mailchimpSubmit" value="1">. With that, you can have multiple submit buttons with a different name that each trigger a different FormIt for processing. Fun stuff.
(Side-note to the side-note: when using multiple buttons there’s some special logic as to which button gets “pressed” and thus which value gets submitted. Typically it’s the first type=“submit” button. If enhancing a form with AJAX, you’ll need to take extra care to get submit button values as they wont be in a serialized form by default iirc.)
For simple single-action form, hidden input with matching name and any non-empty value is simplest.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.