by
KK » Thu Nov 27, 2014 2:21 am
Is there a way to AJAXify a DataBound form? I'm not sure its possible given that DataBound forms seem to be generated by Couch in the first place.
AJAXifying any Couch template is no big deal - create a template with only the databound form and call it via jQuery.
Since in this case you would want the template called via AJAX to return only a success or failure value (instead of markup for the full form), you can wrap up the form within cms:capture tags (please see docs if this is new for you) to control what gets outputted.
The tough thing would be to submit POST data to that form in a format that it expects - if I understood you right, you'll try to create this data on the fly using JS and submit it to the DataBound form.
It can be done if you play around a little submitting the real DataBound Form and studying the $_POST array's structure that is received by the server.
Hope this helps.