Forums

radio box events not worksing

dnigra 14 Jan, 2015
I have a radio box where users choose the action they want to take: "New", "Modify" or "Delete".

Depending on their selection, a different set of hidden fields should then be shown. But all hidden fields are shown no matter what choice the user makes. What am I doing wrong?

Several screenshots attached which I hope are helpful, showing the settings for the registration radio box and the form on load and after "Delete" is chosen.

I also tried setting the radio events to be on ="New" show parent but the results were the same.

Thanks as always, Dnigra
BNDragon 15 Jan, 2015
Hi Dnigra,

First I suggest you to set your fields inside of a div, it's easiest to make the events. Ie, if you have one div for each type you only need 6 events.😉

Second, did you try set the value o radio with numbers and not strings?

BN
dnigra 22 Jan, 2015

Hi Dnigra,

First I suggest you to set your fields inside of a div, it's easiest to make the events. Ie, if you have one div for each type you only need 6 events.😉

Second, did you try set the value o radio with numbers and not strings?

BN



So I tried setting the radio values to numbers per your suggestion, but still, when I choose any of them, all the hidden fields are displayed. Can you see what is wrong?

Many thanks, Dnigra

[attachment=2]reg_type_numbers.png[/attachment]
[attachment=3]reg_type_numbers_events.png[/attachment]
[attachment=1]form_onload_numbers.png[/attachment]
[attachment=0]form_choose_delete_numbers.png[/attachment]
dnigra 22 Jan, 2015
Also, the radio field in demo-fields-events demo form does not work for me. The checkbox event does, when I check "I accept..." the submit button is enabled. But nothing happens when I choose "other" in the radio box field.

[attachment=0]demo-event-form.png[/attachment]

Suggestions?

thanks...........
dnigra 22 Jan, 2015
However, if I use a drop-down instead of radio buttons, it works like a charm.

I will go that way for now, but would still like to know why the radio boxes don't work. Any ideas?
BNDragon 23 Jan, 2015
Hi,

This post talk about the same problem, or kind of the same, and the solution propose from Bob is making a JS script.

why this happen? I don't known, but like to known too.

BN
dnigra 23 Jan, 2015
Thanks - the thread you link to very helpful - I need that functionality also - but it is a different issue. In that case, different fields are required depending on a user selection, and the form designer needed to know how to stop the form from validating fields that are not necessary for a given selection.

I am just (at this point) trying to display or hide fields depending on whether the user wants to add, modify or delete a domain name. For example, not much information is required if a domain is to be deleted, just basic contact info so we can follow up. But to add a domain, almost every field is required. I can hide any field I need to on load. But if the choice is a radio button, no matter whether the user chooses add, modify, or delete, all fields are then displayed.

And this works just great if I make add/modify/delete a drop down, but it does not work if I use radio buttons.

Bob (and all others responsible for CF) - thank you so much for this functionality. CF is really powerful and easy to use. It makes me look like a form genius. Thank you!

dnigra
BNDragon 23 Jan, 2015
Hi dnigra,

You right, that issue is different than yours, but basely is the same thing, using the radio buttons to trigger the events that don't work.

This is why I linked to the thread. I didn't figure out how to make it work at first, I had created a JS script to do some like that in SEBLOD (CCK), so I adapt it to my form, and worked.

I admit I could have insisted more to try for the work and created a topic here, but as I had the hand code, I decided to go the easy way this time.

BN
dnigra 23 Jan, 2015
Answer
1 Likes
Turns out this was a bug and the newest version includes a patch to correct it.

Here is the answer: https://www.chronoengine.com/forums/posts/f2/t98016/disable-enable-events.html
BNDragon 23 Jan, 2015
Hi dnigra,

Good to know.🙂

Cya,
BN
This topic is locked and no more replies can be posted.