Pre Selected Field Based on Link

woogygun 23 Jan, 2013
Hi there Guys!

I've got a tricky form i need to create. I essentially am creating a pre registration form for multiple events. The form is exactly the same for each event. When i store the data from this form though i need to know which event they registered for.

My thought pattern here is as follows:

1. Have perhaps a drop down field that contains all the events.

2. On the event details page add an id or other identifier to the register button that passes through to the form and selects that event in the drop down field.

Is my logic correct here? If not is it doable in a different way?
GreyHead 25 Jan, 2013
Hi woogygun,

That sounds OK - but you don't need 1) if the users will always arrive at the form having already selected an event.

Bob
woogygun 25 Jan, 2013
Many thanks for the reply GH. Im actually though, looking for a way to do the above though.
GreyHead 25 Jan, 2013
Hi woogygun,

That will work if the drop-down has the same name as the parameter you pass from the other form then the event will be selected.

Bob
woogygun 25 Jan, 2013
Hi there GH

Sorry to be a pain here. Im a bit our of my depth on this. How exactly would i pass it through?
GreyHead 25 Jan, 2013
Hi woogygun,

It depends what you have on the events details page. If you are using a link then include something like &event_id=xxx in the URL.

Bob
woogygun 25 Jan, 2013
ok im going to get a working example going and revert.
GreyHead 28 Jan, 2013
Hi woodygun,

First you need to change the name of the select drop-down to something other than 'event' say 'eventx' (please see this FAQ for the reason.)

Then add &eventx=event3 to the link on the Registration button and that should work OK.
index.php/component/chronoforms/?chronoform=registration&eventx=event3


Bob
woogygun 28 Jan, 2013
Worked perfectly thanks so much!
This topic is locked and no more replies can be posted.