I've had it with the combo box for now, so for the gender, I am forced to use something else, like the radio buttons. I have two radio buttons, one for Male and one for Female and then grouped them. I set their RadioBehavior to true so only one or the other can be chosen.
The individual controls are called chcMale and chcFemale.
How do I extract the value from the one chosen? I tried true, false 0's and 1's - none of that worked.
So,
if chcMale = "1" then
put "Male" into Gender
end if
if chcFemale = "1" then
put "Female" into Gender
end if
did not work. Nor did true or false.
So, how do I extract the answer chosen?
Mike
SOLVED - How to get the value from a radio button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
SOLVED - How to get the value from a radio button
Last edited by admin12 on Fri Jul 29, 2011 3:24 pm, edited 1 time in total.
Re: How to get the value from a radio button
Hi Mike,
Hint:
You can omit the "= true" part, in that case the engine presumes you are querying TRUE.
FALSE needs to be scripted however: if the hilite of btn X = FALSE then
All this and more can be found in the stack "Controls" here:
http://www.runrev.com/developers/lesson ... nferences/
In case I didn't mention and you didn't check this yet!
Best
Klaus
Code: Select all
...
if the hilite of btn "chcMale" then
put "Male" into gender
else
## There are only two options, so we do not need to check the other option!
put "Female" into gender
end if
...
You can omit the "= true" part, in that case the engine presumes you are querying TRUE.
FALSE needs to be scripted however: if the hilite of btn X = FALSE then
All this and more can be found in the stack "Controls" here:
http://www.runrev.com/developers/lesson ... nferences/
In case I didn't mention and you didn't check this yet!
Best
Klaus
Re: How to get the value from a radio button
Very nice. I just read through your controls chat/lesson. Good stuff and it will help.
Still, I will ask for help and I thank you for yours.
I will go through all of those lessons when I have the time.
Mike
Still, I will ask for help and I thank you for yours.
I will go through all of those lessons when I have the time.
Mike
Re: How to get the value from a radio button
Does this also work for check boxes? Are they identical to radio buttons?
Mike
Mike