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
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
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...........
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?
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
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
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
Hi dnigra,
Good to know.🙂
Cya,
BN