Forums

Expanding and Hiding Contact Method Groups With Text and Radio Buttons

bgareth2 25 Aug, 2016
Hello,

I am trying to set up a form that allows users to tick one or more different methods of contact. In this example, Email, Telephone and Post.

Importantly, the Telephone and Post have several boxes that I associate with them (for example telephone has "mobile" and "landline" (I have not attempted to categorise them in any other way other than the way in which I have added the text boxes to the form).

I have watched this tutorial as a starting point: https://www.youtube.com/watch?v=qHNmms9Qb_s and I have got as far as being able to tick one box to make an otherwise hidden box appear when ticked.

The problem I have is:

a) I cannot work out how to untick the box and have the extra associated boxes for the contact method disappear again;
b) I cannot work out how I can have more than one group of contact method boxes appear.

I am sorry that this is probably chronically worded. I am playing with the form currently but this is the temporary link: http://www.gbglaw.org.uk/GBGLaw2/index.php?option=com_content&view=article&id=143&Itemid=289

Thank you so much for your time and Kind Regards,

Beanie.
GreyHead 26 Aug, 2016
Answer
1 Likes
Hi Beanie,

The ChronoForms Events handler gets indigestion with CheckBox groups and can't handle the multiple values they can have. It's fine with Radio Buttons or with individual Check Boxes (with distinct ids).

If you need the code to work with a CheckBox Group then you have to write Custom JavaScript for that :-(

Bob
bgareth2 26 Aug, 2016
Thanks for this Bob 😀

Kind Regards,

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