Hi, thanks for the great and powerful v4 !
I've got a chain of forms to be filled in, some only need to be filled in some cases.
This depends on what radio button was clicked in the first form.
So it goes something like this:
Form1 -> radio1==1 ====> On Submit: Load form 2
Form1 -> radio1==2 ====> On Submit: Load form 3 instead
So, Is it possible to do a Load Form depending on the value of a variable in a form?
I'd like to avoid javascript solutions if it is natively possible.
It would be really poweful if this was possible.
Another solution would be to use custom code after the submit, but I don't know what code to insert to load the next form ....
Anny help would be greatly appreciated.
Kind regards,
Johan
I've got a chain of forms to be filled in, some only need to be filled in some cases.
This depends on what radio button was clicked in the first form.
So it goes something like this:
Form1 -> radio1==1 ====> On Submit: Load form 2
Form1 -> radio1==2 ====> On Submit: Load form 3 instead
So, Is it possible to do a Load Form depending on the value of a variable in a form?
I'd like to avoid javascript solutions if it is natively possible.
It would be really poweful if this was possible.
Another solution would be to use custom code after the submit, but I don't know what code to insert to load the next form ....
Anny help would be greatly appreciated.
Kind regards,
Johan
I just realized this would be easy if the Utilities/"Show Form" action supported a PHP eval of the "Form Name", then I could dynamically load the appropriate form...
I don't suspect it works that way, but I'll try
I don't suspect it works that way, but I'll try
Hi jnobel,
You can do this in several ways. You can use the ReDirect URL & ReDirect User actions, a Custom code action, or my custom Event Switcher [GH] action.
Which is best depends on the complexity of what you need to do. If you can build the ReDirect URL directly from the Form Data then that's the simplest way to go. If you need to process code then a Custom action with $mainframe->redirect(); will work OK; if you have multiple choices then the Event Switcher becomes useful.
In any case you should probably either save the current data using s DB Save action, or temporarily store it in the Session with a Data to Session action.
Bob
You can do this in several ways. You can use the ReDirect URL & ReDirect User actions, a Custom code action, or my custom Event Switcher [GH] action.
Which is best depends on the complexity of what you need to do. If you can build the ReDirect URL directly from the Form Data then that's the simplest way to go. If you need to process code then a Custom action with $mainframe->redirect(); will work OK; if you have multiple choices then the Event Switcher becomes useful.
In any case you should probably either save the current data using s DB Save action, or temporarily store it in the Session with a Data to Session action.
Bob
Thanks Greyhead!,
I'll give all options a try.
I completely forgot about the possibility to use actions (You can write your own I think?)
That is also a possibility of course.
You are a very great resource on the Chronoengine forum, helping out so many people!
I'll give all options a try.
I completely forgot about the possibility to use actions (You can write your own I think?)
That is also a possibility of course.
You are a very great resource on the Chronoengine forum, helping out so many people!
Hi jnobel,
You can write your own actions - it takes a bit of work but if you copy an existing simple action and go step by step it's not too difficult.
Bob
You can write your own actions - it takes a bit of work but if you copy an existing simple action and go step by step it's not too difficult.
Bob
This topic is locked and no more replies can be posted.