Forums

Load form by AJAX

smalle 06 Mar, 2012
Hi
Big fan of Chronoforms here....
Sorry if this is "duplet content".

Is it possible to load a complete form by ajax?
Flow:
On the page the user type their postal code and submits
By ajax af complet ChronoForm form is loaded (appears on page).

I know I can load by echoing html-codes in the ajax-response, but is
it possible to call the ChronoForm itself and put it in the response.

I would be nice as I then can control the form completely from the Chronoform
control panel.

Thanks for a great product
Regards Smalle
GreyHead 06 Mar, 2012
Hi Smalle,

I've never seen this asked before and don't know the answer. My best guess is that it should be possible. You can load a form into a modal window so I imagine that you can cload oen from an Ajax query.

Bob
smalle 07 Mar, 2012
Hey GreyHead
Update:
I have loaded a form via ajax by creating a Chonoform-module and render the module via AJAX.
So its possible.

My problem is that JS-validation is not working and the SUBMIT-URL is wrong. I can correct the URL by redirecting it from control panel, but then I will miss all the email features.

Do you have a solution for the above?

Regards Smalle
smalle 07 Mar, 2012
Hi again
Progress:
I have now loaded a form with ajax by echoing a wizard form into a <DIV>.
This works.

But how do I enable JS-validation for the injected part. Is there something that
should be reloaded af ajax response has been output on the page?

When I echo the form with the Customcode event, it can be validatet be JS through ChronoForms.
This makes me think that some code must be reloaded after the render of the extended form, correct?

Regards Smalle
This topic is locked and no more replies can be posted.