I want to use 'def ajaxForm(onSubmit: JsCmd, body: NodeSeq)' and
update a hidden fields value on submit with some value. The problem is
that the generated javascript for the onsubmit event first executes
the serialize on the form and then uses my code for onSubmit.
E.g. ajaxForm(bind("editor", xhtml, "hidden" -> hidden(updateContent
_, "", ("id", "hidden")), "save" -> submit("Save", () => {})),
SetValById("hidden", Str("This should be the content of hidden"))))
This updates the hidden field value after the submit and updateContent
gets only the old value from the last submit. With a normal form it
works without problems with the update code triggered by onSubmit.
Is there a way to update the hidden field before transferring its value?
Thanks,
Tobias