Forums

Using AJAX to add field

pjsteinfort 06 Jul, 2009
Hi there

Im really keen to use chronoforms, but one limitation for what we may want of it is Im not sure how it would work with dynamic user actions... Ill explain in more detail:

We have a few pages in our forms where we give a user 2 form fields, but they need to be able to add extra form fields if they want to. These new fields will behave and submit in exactly the same way as the original 2 default fields. Can we add our JS scripts somewhere to make this happen?

We also want the form to be able to dynamically respond to the input of previous forms (ie populate text labels with db values, and create a certain number of input fields according to the number of inputs on previous forms)... Can we do this too?

Thanks in advance

Paddy
GreyHead 06 Jul, 2009
Hi Paddy,

Yes and Yes. Exactly how you would do it is a bit more complicated.

Basically you can add JavaScript to the Form JavaScript box on the Form Code tab (or perhaps better you can use the MooTools domready event and add it to the Form HTML box).

The Multi-step form Plugin will let you creat multi-step forms - there's a little tutorial in the Plugins Forum here that shows how to include info from earlier steps.

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