Ask a Question related to Coldfusion Database Access, Design and Development.
-
Abdlah #1
Radio button insert
Hello,
I have the following code in my project:
<cfinput type="radio" name="gender" value="Female" checked="yes"> Female
<cfinput type="radio" name="gender" value="Male"> Male
Now i want to save the value of the selected radio button i.e. Male or Female
into a database and I use the following code
Insert into Consumer(...., gender,...) values (..., FORM.gender,...) but I get
a no/yes value in my database instead of Female/Male.
How do I get Female/Male to be recorded in the database instead of a yes/no
depending on what the user selects?
Abdlah Guest
-
radio button
i have 2 radio button and i want to set the 1st one is defaul <CFSET typeA = 'exempt'> <INPUT type='radio' name='typeA' value ='exempt'... -
Radio Button vSpacing
Hello! I know this has to be really simple, but I can't seem to get it right. I have a flash survey that pulls the questions and radio buttons... -
Radio Button Validation
:o Hello, I am using CFForm and CFInput to construct a rather simple form. However, the javascript that I am using in the onvalidate event of one of... -
Radio Button Help me please!
Hi I need help quick! let me explain my problem: Ičve made a form in flash with textfields and radio buttons. It submits the data from the... -
Insert Radio Group
I did an insert Radio Group from the forms object. Is there a way for this tool to allow for multiple radio buttons to be checked instead of just... -
jdeline #2
Re: Radio button insert
What is the data type of the field in the database. I'd bet it is not text. Also, I you need '#FORM.gender#' in your values list in the insert statement.
jdeline Guest
-
Abdlah #3
Re: Radio button insert
The datatype of the gender field is text, also I do have '#TRIM(Form.gender)#' in my insert statement, yet the value posted to the database is a yes/no type.
Abdlah Guest
-
Dan Bracuk #4
Re: Radio button insert
If you do <cfdump var="#form#"> what do you get for the gender?
Originally posted by: Abdlah
The datatype of the gender field is text, also I do have '#TRIM(Form.gender)#'
in my insert statement, yet the value posted to the database is a yes/no type.
Dan Bracuk Guest
-
Abdlah #5
Re: Radio button insert
Hi,
when I do <cfdump var="#form#"> I get male or female for gender.
Abdlah Guest
-
Dan Bracuk #6
Re: Radio button insert
You don't need to trim the form variable, even though that is probably not what
is causing your problem. If you have debugging turned on, put a cfabort after
your input query so you can read the sql.
Do all the other fields receive their expected values?
Dan Bracuk Guest
-
Abdlah #7
Re: Radio button insert
Actually, something really weird happened, I accidentally closed dreamweaver
and had to start it again, and now the database recieves the right value. I
don't understand what happned. Now I have a series of On values and one Male
value for my last submission.
This happened after I tested the action page with the cfdump you suggested.
Thanks for the help.
Abdlah Guest



Reply With Quote

