Forums

capturng button sequence leading to form

simong 23 Dec, 2009
Hi Bob
Good to see Joomla has you guys with 5 stars, this forum alone is invaluable! Thanks for some great work. (ooohoh : merry Christmas to the ChronoEngine team... hope 2010 is a great year for you)

Ok... I ask only for your suggestions here... I have a fairly simple form that sits at the end of a sequence of buttons - ie. Question 1, optioned - A, B and C; Question 2, results from 1B and has options A and B.
I need to capture Q1 and Q2 with the options AND then ADD them to the form.
::::::
School entry form - choose Subject with majors in A,B or C; choose dates for these courses - A, B or C; and then complete a standard form of name, address, etc
::::::
What do you suggest is the best method to achieve this - to capture the input? Fundamentally there 7 level one buttons and about 20 or 30 level two 'buttons/options' that lead to the form

Any suggestions?

Thanks greatly in advance, much appreciated
Simon
GreyHead 23 Dec, 2009
Hi Simon,

Thanks for the kind thoughts, much appreciated.

I'm having a problem visualisign this flow. When you say the form is 'at the end of a sequence of buttons' how are you managing the sequence of buttons? Are they in the form - or in something else?

If the buttons are in the form then the previous results will be available.

This seems to me like a form with a JavaScript engine running in the background to display the next questions in the sequence?

Bob
simong 23 Dec, 2009
Hi Bob

No no... it is very simple... like I mean real simple!

Page 1... 3 options/buttons A, B, or C > choose one
Page 2... result of Q1 option B; then three more choices - i, ii or iii > choose one
Page 3... summary = Bii
Add "bii" to form as field, complete name, address
Submit

(see: <!-- w --><a class="postlink" href="http://www.ttoc.com.au/docten/">www.ttoc.com.au/docten/</a><!-- w --> - choose "New Entrant". Click the first button, form will appear two options later)

How do you suggest I feed the results of these options, into the form?

Thanks Bob
GreyHead 23 Dec, 2009
Hi Simon,

Basically make sure that the buttons contain the info - so if it's a URL link add &button_a=99 to the URL. Then with the second step add &button_a=99&button_b=xyz (probably a little more coded in practice).

That will work; or, if you want to be more subtle, you an add the info to a cookie or to the Joomla session and pick that up when you get to the form.

Bob
simong 24 Dec, 2009
Thanks Bob 🙂

And final question... how do I capture that string in the form - your example, the URL (I have one form for many)

Thanks in advance.
(I will check that you are NOT here on Christmas day... have a safe New Year!!)

Simon
GreyHead 24 Dec, 2009
Hi Simon,

To get a parameter value from the calling URL line ¶m=value use
$param = JRequest::getVar('param', '', 'get');

Bob
simong 24 Dec, 2009
Hey Bob

Merry Christmas here!!

A little over my head at the moment though will give it a try

Thanks in advance... have a good one

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