Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / June 2007



Tip: Looking for answers? Try searching our database.

Element RADIOV is undefined in FORM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
susanring - 29 Jun 2007 00:03 GMT
Hello
i have this.
i want to insert values like blue,  yellow,  or red
in the database field col_Radio.  

what do i have to change to make this work?

thank

ERROR:

Element RADIOV is undefined in FORM

Exceptions

15:53:22.022 - Expression Exception - in
C:\CFusionMX7\wwwroot\ACT_inputcolor.cfm : line 10
       Element RADIOV is undefined in FORM.

note:  line 10 is     '#Trim(Form.RADIOV)#',

--------------------------------------------------------

What do I have to change for the element radiov to be defined or is this the
only error??

here is the first page:
<html>
<head>

</head>
<body>
<cfform name="myform" action="ACT_inputcolor.cfm" method="POST">
<div align="center"><br>
<input type="radio" name="group1" value="Blue"> Blue<br>
<input type="radio" name="group1" value="red" checked>red<br>
<input type="radio" name="group1" value="yellow"> yellow

</div>

<INPUT TYPE=SUBMIT VALUE="submit">

    <td width="1"></td>
</tr>

</cfform>
</table>
</form>
</body>
</html>

<!-----------here is the action page----------->

<cfquery name="InsertRadiocolor"
    datasource="#Request.MainDSN#">
INSERT INTO Tab_radio_color(
    col_Radio,

)
VALUES (

    '#Trim(Form.RADIOV)#'

)
</cfquery>
ForumUser - 29 Jun 2007 00:17 GMT
Change Form.RadioV (which is not defined in your form) to Form.Group1.
susanring - 29 Jun 2007 15:25 GMT
thanks i changed it but i got this error.

Error Executing Database Query.

7:23:13.013 - Database Exception - in C:\CFusionMX7\wwwroot\ACT_inputcolor.cfm
: line 10
       Error Executing Database Query.

line 10 is :

    '#Trim(Form.Group1)#'

<cfquery name="InsertRadiocolor"
    datasource="#Request.MainDSN#">
INSERT INTO Tab_radio_color(
    col_Radio,

)
VALUES (

    '#Trim(Form.Group1)#'

)
</cfquery>
susanring - 29 Jun 2007 15:26 GMT
thanks it was the comma
cf_dev2 - 29 Jun 2007 02:33 GMT
In other words, the FORM variable name should be the same as your <input> field name.  

When you submit your form, this
<input  name="group1" ...>

Becomes
#FORM.group1#
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.