Going to another form!

gemag 18 May, 2012
Hello from Spain!
I´ve a form with several radiobuttoms, when the user click on submit button, how could I go to one or another form according with the user choice?
Thank you!
GreyHead 19 May, 2012
Hi gemag,

You can use PHP in a Custom Code action to redirect the user using $mainframe->redirect('some_url'); or you can build a URL using the ReDirect UL action and then redirect the user with the ReDirect User action.

Bob
laurentmartin 26 May, 2012
HI ,
I am also interested in this.
I don't sucess to make it work

my form are:
form 1
form 2
GreyHead 27 May, 2012
Hi laurentmartin,

What code are you using?

Bob
dnigra 01 Jun, 2012
Hi Bob and all,

I have a question in the same vein. I want to pass a unique id to a second form, which will retrieve info from the DB.

I set the ReDirect URL and set token=pid in that event. I added a blank Redirect User action.

The users enters the pid in Form1. When the form is submitted, it goes to the correct (second) form but the url is literally
http://www.mysite.com/index.php?option=com_chronoforms&chronoform=Form2&token=pid

So the pid value is not getting passed. If I manually enter a pid in the URL, e.g., http://www.mysite.com/index.php?option=com_chronoforms&chronoform=Form2&token=1234, then Form2 does display the DB info I want.

What am I missing? Many thanks,

Deb
GreyHead 02 Jun, 2012
Hi Deb,

I get confused by this because the usage isn't consistent but I think that you need token={pid} in the ReDirect URL.

If I remember correctly the ReDirect URL action allows curly brackets in the Fields/params box so a plain text string is left as a static value and a curly bracketed string is treated as dynamic.

The cURL action on the other hand doesn't use curly brackets - and so can't accept static values. Static values have to be added to the $form->data[] array before the action is run.

Bob
dnigra 04 Jun, 2012
Bob,

Oh this was so simple I am embarrassed. Using token={pid} was exactly right.

Well, at least maybe this will help others who have the same stupid question.

Thanks again,

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