Pascal
> -----Original Message-----
> From: Pascal Peters [mailto:[EMAIL PROTECTED]
> Sent: 07 October 2004 15:18
> To: CF-Talk
> Subject: RE: Urgent help needed!!! How to check null value in List of
> controls
>
> I'm not 100% certain what you want to do, but have a look at this:
>
> form:
>
> <CFLOOP query="roomTypesInfo">
> <input name="twebroomtypes_name" type="checkbox"
> value="#twebroomtypes_id#">#roomtype#<br>
> </CFLOOP>
>
> <CFLOOP query="roomTypesInfo">
> <INPUT TYPE="TEXT" NAME="fitrate_#twebroomtypes_id#" SIZE="2"
> MAXLENGTH="5" VALUE=""></INPUT><br>
> <INPUT TYPE="TEXT" NAME="allotment_#twebroomtypes_id#" SIZE="2"
> MAXLENGTH="5" VALUE=""></INPUT><br>
> <INPUT TYPE="TEXT" NAME="cutoff_#twebroomtypes_id#" SIZE="2"
> MAXLENGTH="5" VALUE=""></INPUT><br>
> </CFLOOP>
>
> action page
>
> <cfloop list="#form.twebroomtypes_id#" index="i">
> <cfquery datasource="#request.dsn#">
> INSERT INTO tbl (twebroomtypes_id,fitrate,allotment,cutoff)
> VALUES(
> <cfqueryparam cfsqltype="cf_sql_numeric" value="#i#">,
> <cfqueryparam cfsqltype="cf_sql_varchar"
> value="#form['fitrate_' & i]#">,
> <cfqueryparam cfsqltype="cf_sql_varchar"
> value="#form['allotment_' & i]#">,
> <cfqueryparam cfsqltype="cf_sql_varchar"
> value="#form['cutoff_' & i]#">
> )
> </cfquery>
> </cfloop>
>
> If you want to insert null in the db when nothing was entered, you
could
> code the cfqueryparams like this:
> <cfqueryparam cfsqltype="cf_sql_varchar" value="#form['cutoff_' & i]#"
> null="#YesNoFormat(Len(form['cutoff_' & i]))#">
>
> Pascal
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]