Forums

form within a form

nratter 08 Oct, 2012
I'd like to make mini 'sub forms' that I can use when putting together large forms. For instant, if i want a mini form for 'contact info', and a form for 'address'. I then want to be able to put together a large form using these 'sub forms'... possibly on separate pages. I know how to do a multi page form with ChronoForms... can anyone help with this?

Thanks!!
Nick
nratter 08 Oct, 2012
ACK!!!!! I just encountered a MAJOR bug in this extension... I changed the 'form app' to 'sub' and saved. I then tried to change it back to default by erasing 'sub' under 'form app' and saved. as a result, ALL of my forms are missing from form manager. I can still go to the forms by URL, but I can't view/edit them in form manager. HELP!!!!!!!

Nick
GreyHead 08 Oct, 2012
Hi nratter,

Some thoughts about sub forms in the morning (it's late here). For the missing forms check the Forms App dropdown at the top of the Forms Manager list. If they don't show there check the database table in PHP MyAdmin and re-add an app name if it's missing (but back-up first please).

Bob
GreyHead 09 Oct, 2012
Hi Nick,

Some thoughts on subforms.

First off, ChronoForms isn't very sub-form friendly but it is possible to get some results with a little work.

Off the top of my head I can think of three possible approaches:

a) You can use multi-step forms. ChronoForms makes it fairly easy to pass the user and the form data from one step to the next so you could have a 'Contact' form and include that in many different sequences of steps. You'd need though to include some routing instructions so that the Contact form redirected correctly to the next form in the sequence.

b) You can use Custom Element elements with included code. The ChronoForms Wizard creates a chunk of HTML. You can grab this from the form Code tab - prettify it a little and save it to a file, then include that file into a Custom Element element using a PHP include statement.

c) You can use PHP to generate the HTML you need. There's a whole range of options here from a little tweaking of included files to building functions to create your own blocks of inputs.

Bob
GreyHead 12 Oct, 2012
Hi Nick,

I've just noticed that the Show Form action allows you to show one form inside another. I haven't worked with it but this might be another solution to sub-forms.

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