Forums

MultiTab form : how to avoid required field from other tabs?

ledcom 07 Jan, 2014
Hello Chrono Team.

foa a special thanks for your wonderfull work on this comp. I've never seen such a great free form tools in joom.
Second, please excuse my english, i'm belgian and doesn't use to speak english.

And here is my question :
I want to create a form with 3 separated tabs ( ie : sales, rentals, hello). If the customer fill the first, he DON'T need to fill the 2 others tabs and may submit his form. The problem is : i need required field in the 3 tabs.

Can i allow/disallow required field regarding to the completed tabs ?

Not sure if i am really clear here, do not hesitate to ask me twice.

If some of you adore to speak french, i'll painfully do it😉

Thanks in advance,

Cheers

Jean-Simon
GreyHead 07 Jan, 2014
Salut Jean-Simon,

The simplest answer is to make this a multi-page form and to only show the second and third pages to the users who need to complete them. Otherwise send the user straight to the Thank You page.

Bob
ledcom 14 Jan, 2014
In my hurry to finish the website, i forgot to say thanks for your answer.

The client finaly took another forms.... fox....😟
ljk 14 Jan, 2014

Salut Jean-Simon,

The simplest answer is to make this a multi-page form and to only show the second and third pages to the users who need to complete them. Otherwise send the user straight to the Thank You page.

Bob



Hi Bob,

So how do you accomplish this? This is exactly what I need to do, let some users continue on in the form and send others directly to the thank you page after the first page. Is there any example of how to do a multi-page form? I have the v3 chronoforms book, but it looks like things are done differently in V4.

Thanks.
GreyHead 15 Jan, 2014
Hi ljk,

There are two different ways to create a multipage form in CFv4.

The simplest is to create several separate forms (one for each page) and to move from one to the other. You can use the multi-page action to transfer the data in the User Session (that is a wrapper for the Data to Session and Session to Data actions).

A bit more complicated to set up but cleaner is to use multiple pages & events in the same form. You can use the Page Break element to divide up the Preview box and then the Show HTML action 'Advanced (Multi-Page)' tab has settings that let you set the event the current form should submit to and the Page number from the Preview Box that it should display.

Bob
ljk 15 Jan, 2014
Hi,

So, if I want to do the all in one form method, I don't understand how to have custom code, action events on each page. I want to do a 6 or 7 page form and different pages need to make different calculations based on previous page submited information.

Is there an On Load and On Sumbit event for each page and if so, how do you set that up. I looked at the Show HTML Multi-page tab, but it only has 1 Sumbit event and what page to go to. If you change the page, the form starts on the page number you put in rather than the first page.

This is so complex, would there happen to be an example multi-page form that we could view to see how it is setup?

Thank you.
GreyHead 16 Jan, 2014
Hi ljk,

Please see this FAQ, I'd forgotten that I had written it a while ago.

I think the examples there will give you want you need. It is a bit complex so I'd suggest building a very basic test like the demo to help understand.

Bob
ljk 17 Jan, 2014
Hi Bob,

Thank you for that link, it was very helpful and now I have a form that moves from one page to the next. The problem is that when submitting page 1 it should either go to page 2 or directly to page 4, depending on the answer to one of the questions on Page 1. Using the Show HTML Multipage doesn't give you the ability to add logic to determine which page to go to, only to just go to a particular page. On page 2 it will either need to go to page 3 or page 4 depending on what the user submits. So, how do you accomplish that?

As an aside your Show HTML [GH] doesn't refresh the event list in the Multi-Page tab, so you can only choose submit or load. It doesn't add the other pages like the Show HTML one does. I am using your Nov-13-2013 version.

Thanks again for the help on this.
GreyHead 17 Jan, 2014
Hi ljk,

You need to make the redirect conditional. On the Submit event for the first page use my Event Switcher [GH] action (or one of the other conditional actions) and redirect the user to one form or the other.

Bob

Thanks for the heads up on the Show HTML [GH] action, sounds like a JavaScript error has crept in. As a Workaround, saving and reloading the form should refresh the list correctly - unless something more fundamental is broken.
ljk 17 Jan, 2014
Hi,

I was talking about a a single form with multiple pages rather than a multiple page form.

With the single form with multiple pages, how do you conditionally redirect to one page versus another, using some PHP logic, since there is only 1 'On Submit' event? The single form would work much nicer if there is a way to conditionally redirect to different pages of the single form.

Thank you.
GreyHead 18 Jan, 2014
Hi ljk,

See my previous answer, you can use the Event Switcher to redirect to another event in the same form or another from. Both will work.

Bob
ljk 20 Jan, 2014
Hi,

Sorry, I still don't know where to put the event switcher and what do I use to move to a different page of the current form?

I have:
On Load -> Multi Page and Show HTML
On Submit -> Multi Page
Page 2 -> Multi Page and Show HTML
Page 3 -> Multi Page and Show HTML
Page 4 -> Multi Page and Show HTML

So when Page 1 is submitted I either want to continue on to Page 2 or jump to Page 4 depending on the value of one of the form fields on Page 1. So I would add the Event switcher before the Show HTML in the Page 2. What do I put in Event A of the Event Switcher to move to Page 4? I don't see an event that moves between pages, only the Redirect User to another URL. Is there something else to use?

Thank you.
Max_admin 20 Jan, 2014
Yes, just use the Redirect action to go to page#4, and since it comes after the "multi page" action then the data from page#1 will be preserved!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.