Forums

How to open more (form)options if a user click a button

tobisagt 08 May, 2012
Hi,

i have a form with many options.
If a user click for example "more options", the form should get larger and show the "more options".

For better understanding see this link please:
http://www.fussballcamp-schmid.de/spieleland/

I you scroll dont a bit you see the radiobutton for: "zweites Kind?"
I you click "Ja" (Yes) it shows more options.

Thats it what i exacly want to do. I know it can be done with javascript. I just know a little bit about jQuery but not mootools. So it would be nice if someone can help me out!

Best regards
-Tobi
tobisagt 11 May, 2012
no answer?

This is really important for me and will be a reason to buy Chronoforms.
Max_admin 11 May, 2012
Hi Tobi,

Sorry for the delay, its a very busy week and I'm here alone because Bob is away this week!๐Ÿ™‚

You may assign a style attribute = display:none; for the "more options" div container, and when the radio button is clicked you may change the display to "block", but if you need to enable/disable some validations too then things will get more complicated.

Tell me the id or the class name of both the "radio" and the "more options" container and I will give you a code sample here.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tobisagt 12 May, 2012

Hi Tobi,

Sorry for the delay, its a very busy week and I'm here alone because Bob is away this week!๐Ÿ™‚



No need to say sorry! Sorry for my impatience๐Ÿ™‚

You may assign a style attribute = display:none; for the "more options" div container, and when the radio button is clicked you may change the display to "block", but if you need to enable/disable some validations too then things will get more complicated.


I dont thought about that... how can i put a div container into my form and insert some input fields?๐Ÿ˜‘

The id for the "radio" will be "ifsecond" and the "more options" containers id will be "second"

Thx for help!
GreyHead 15 May, 2012
Hi Tobi,

The trick is to disable the hidden inputs - the FormCheck validation will then ignore them - and enable them when you display them. See an example here.

Bob
tobisagt 16 May, 2012
perfect! Thx you very much!! ๐Ÿ™‚
This topic is locked and no more replies can be posted.