Dividing form to multiple pages

Permalink
Hello,
I am new in CC5 but enjoying it.

I am building a website for my business, and I made an order form page.

Form became very long in one page and will be very boring for clients to input data.

I used simple form block which is the best in my opinion.

But how can I divide form to multiple pages?

Is there a way without writing php code by using the block itself?

best regards

Ali

http://stepcraft-turkey.satranchaber.com.tr/index.php/stepcraft-tur...

occamsrazor
 
mnakalay replied on at Permalink Best Answer Reply
mnakalay
Hello,
Something you could try but it's a total hack is to create several pages with 1 short form on each. Then, in the settings of your first form, instead of showing a thank you message on submit, set it to redirect to another page and select the page where your second form is.

Frankly, it is truly a sub-par solution that will probably make your clients hate the whole experience. In that regard having a long form might be better.

Having said so, it is the only solution I can think of that requires no code at all.

Another much better way would be to find a multi-step form script somewhere and use it. That would require coding to:
- use the script with the form
- deal with field validation
- show the correct step on page reload in case of validation failure

So that would be more involved.
occamsrazor replied on at Permalink Reply 1 Attachment
occamsrazor
Thank you!

that was very useful help, I was thinking the same but was not sure that input data will come to reports under one form entry...

So you say that the data will be carried till the last page of multiple form page section?

I will try it.

The problem with one page form is that...

If I enter 5-6 fields following each other when I save it an error messages comes. So, what do I do? I enter 2-3 fields save the form and continue for the description of other 2-3 fields...

It slows the process. There is a bug I donot know what, I enter the same fields again.

I do not know why. I will share the screen capture, when it happens again.

Thank you for the fast and excellent help :)

regards,
mnakalay replied on at Permalink Reply
mnakalay
Well no, no data will be carried from one page to the next. But on submitting each form is saved in the dashboard so you will have access to the results.

The scenario you describe with users having to re-fill the whole form in case of validation error is not likely, though. If there is an error and the page reloads, the fields will still have the user data in them.
JohntheFish replied on at Permalink Reply
JohntheFish
I have been kicking around an idea for splitting an express form into sections using Magic Tabs. It would require an attribute that, rather than rendering an attribute form, rendered a tab marker. The attribute could then be placed on the form where new tabs are needed, and the whole lot wrapped in tab start/end blocks. There could be some broken dom cases that would need to be sniffed out by the tabs script and corrected for div's inserted cutting across the form elements at the start and end.

The result would be a form on one page, with each sections of the form in a tab.

The idea is sparked by a client who coded a custom form as multiple blocks so they could be wrapped in Magic Tabs. They designed the tab markers with rectangular profiles and chevrons on the right side, so it looked like a form wizard.
occamsrazor replied on at Permalink Reply
occamsrazor
Fantastic idea
so instead of content block in quick tab, I wil put there basic form block.

but may you tell me how will I rid off "submit" button on each tab?

Maybe I have to try first to see what happens...

Thank you!
JohntheFish replied on at Permalink Reply
JohntheFish
It isn't currently an off the shelf solution. You would need to implement new code for one of the strategies I describe. Either
- a tab marker attribute to place in an express form (an untried idea I am considering implementing for c5v8),
or
- some custom views for the form block that have the form start, each section of the form, the form submit and the form end (tried and tested, but not code I can provide). The customer who implemented this placed each form control in a separate block view and then grouped them into sections using Magic Tabs, so perhaps split more than it needed to be. Each form block view had to use the same form, which was edited through (I think) the first block.

So the 'blocks' on the page were
Form Start
MT Section 1
Form control a
Form control b
MT Section 2
Form Control c
Form Control d
Form Control e
MT Section 3
Form Control f
Form Submit
MT End
Form End

Note the above could break the dom in edit mode, so the form start/end blocks would need a condition to test for edit mode and leave out the form and /form elements in edit mode.

I can't go into more detail than that. It requires some coding and trickery to make it work.
JohntheFish replied on at Permalink Reply
JohntheFish