If I understand correctly, you want to replace empty form fields by
zero?

form["ACRES_" & i] = Val(form["ACRES_" & i]);
form["AMT_" & i] = Val(form["AMT_" & i]);
amtInsurance = form["ACRES_" & i] * form["AMT_" & i];

Pascal

> -----Original Message-----
> From: Jillian Carroll [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 29 juni 2004 21:52
> To: CF-Talk
> Subject: No default zero
>
> I've been playing with this for a while.  I don't want zero's
> to be visible in these form fields, I just want them to be
> blank until/unless a value is entered. The problem is that I
> get an error when the calculation is done (for amtInsurance)
> on the fields that are 'blank'.
>  
> <cfparam NAME="Form.ACRES_#i#" default="0"> <cfset
> "Form.ACRES_#i#"=val(spanincluding(replace(Evaluate("Form.ACRE
> S_#i#"),",",""
> ,"all"),"0123456789"))>
> <cfset totAcres=totAcres+#Evaluate("Form.ACRES_#i#")#>
> <input name=ACRES_#i# value="#Evaluate("Form.ACRES_#i#")#" size="4"
> style="text-align:right"></td>
> <cfparam NAME="Form.AMT_#i#" default="0"> <cfset
> "Form.AMT_#i#"=val(spanincluding(replace(Evaluate("Form.AMT_#i
> #"),",","","al
> l"),"0123456789"))>
> <td align=right>$<input name=AMT_#i#
> value="#Evaluate("Form.AMT_#i#")#"
> size="4" style="text-align:right" > > <cfset amtInsurance=Evaluate("Form.ACRES_#i#*Form.AMT_#i#")>
>  
> Any ideas?
>  
> --
> Jillian
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to