Page 1 of 1

Formbuilder or CGBetterForms display input previous page??

Posted: Fri Feb 23, 2018 3:28 pm
by Edwin_IandD
Hello all,

I know Formbuilder can use forms with several pages and it's quite easy to set this up. I assume the new CGBetterForms module can do this as well. I haven't tried this module, but I will on my next website.

But what I don't know, and certainly not how to, is if it is possible to display the info from the previous page on any additional pages. Ideally 'copied' into the same input element.

What I am thinking of doing for a B&B website is make an booking enquiry form with a date picker on the front page with a 'next' button to the rest of the form where people can fill in their details. Obviously on the next page you would still need to see the date you picked, ideally with the option of changing it.

A lot of hotel and B&B websites are using a system like this and I think it looks pretty smart and above all entices people to check availability and make a booking!

So, if anyone of you can tell me if this is possible and how I would be most grateful! :-D

Many thanks,
Edwin

Re: Formbuilder or CGBetterForms display input previous page

Posted: Fri Feb 23, 2018 6:32 pm
by calguy1000
CGBetterForms does not have the concept of 'multi-page' forms.

If you want to do something like this... then I would suggest using a jquery slider plugin or an accordion or something... and making it one form.

The data entry portion is just split up for validation and UI purposes.

You could use ajax to check the date field for availability when the 'next' button is pressed.

Re: Formbuilder or CGBetterForms display input previous page

Posted: Sat Feb 24, 2018 10:46 am
by velden
Soon, I will be working on the (exact) same concept for a booking system.
And I think CGBetterForms (CGBF) supports this method (it required some tips from calguy).

I'm not sure which module I will use but have been testing with CGBF. Setup two separate forms and give the first form (e.g. 'FormA) a handler 'Store form results in the session for further processing'

Then further down the road you can use the results like this:

Code: Select all

{$fd=$smarty.session['FormA']}
{$fd->get_field_value('firstname')}
{$fd->get_field_value('lastname')}
Also make sure to read the CGBF help from start to end (I didn't and came up with a false bug report http://dev.cmsmadesimple.org/bug/view/11742 <- read Robert's comment anyway, can be helpful)

For storing the final results I'm thinking of using LISE but a few days ago calguy released CGBFCrud (assuming Crud stands for CReate, Update, Delete) http://dev.cmsmadesimple.org/projects/cgbfcrud which might be a good alternative. I didn't check it though so I don't know if it will be easy to handle the data of two forms at once.

Might be interesting to share some experiences here as it seems we're going to build something similar.

Re: Formbuilder or CGBetterForms display input previous page

Posted: Mon Feb 26, 2018 9:09 am
by Edwin_IandD
Thank you very much for your replies!

I need to look into the new modules but it seems feasible.

It might be a while before I get to the building stage of the site. At the moment we are only at the design stage and the client needs to have a good look at the design I came up with.

I'll try and post back any progress if I can.

Thanks again!
Edwin