Radio Box Option ID

paulsmithx 04 Feb, 2013
Greetings,
I've just installed Chronoforms 4.0 RC3.5.2.

In previous versions the radio option id was to be taken from the left hand side of the item definition. Such that if I had a radio box called reg_session with the following options:

35.00=$35, Non-member
30.00=$30, Member
25.00=$25, Student

I would find items reg_session_35_00, reg_session_30_00 and reg_session_25_00

The new version seems to ignore the left side and just gives them

I would find items reg_session_0, reg_session_1 and reg_session_2 which causes havoc with my javascript whenever a user saves one of the old forms.

Is this intentional, have I missed a setting somewhere, or do I just have to live with it and go back and change all of the old forms?
Many thanks,
Paul
GreyHead 04 Feb, 2013
Hi Paul,

I don't remember that CFv3 did that, but it may have done.

What is the actual problem that results? There may be a way to fix that.

Bob
paulsmithx 05 Feb, 2013
Problem is that my Java Scripts references them based on the expected name, rather than the new name

eg, where the ID used to be ctlSession_35_00 is will now be ctlSession_00 (or 01, 02, nn)

I can fix it by changing the code for new forms, it's just that my user saves an old form using the wizard it will break as the script references the old ids.
GreyHead 05 Feb, 2013
Hi paulsmithx,

Sorry but I don't recognise that behaviour at all. I created a little test form in CFv3 and it doesn't do that as far as I can see. Are you sure that your forms were created with ChronoForms?

I'm afraid that the safest answer is probably to re-write your JavaScript so that it isn't dependent on the individual radio button ids. I've used the MooTools $$() to grab a set of buttons into an array that can be interrogated to get the individual values and texts.

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