Parameter 1 of function DollarFormat; must be a number

I have:

<B>Gift Amount</B> <CFPARAM name="form.Amount" default=0>
<CFIF session.myTransactionMode eq "addPayment" AND session.myPaymentID neq "">
$<cfinput name="myAmount" value="#Right(DollarFOrmat(form.Amount),Len(DollarFOrmat(form.Amount))-1)#" tabindex="#myTab#"
type="text" id="myAmount" size="10" class=notetext2 validate="regular_expression"  disabled
pattern="^\d+\.?\d{1,2}?$" message="Please double-check the Amount you entered!">
<INPUT type=hidden name=Amount value="#Right(DollarFOrmat(form.Amount),Len(DollarFOrmat(form.Amount))-1)#">
<CFELSE>
$<cfinput name="Amount" value="#Right(DollarFOrmat(form.Amount),Len(DollarFOrmat(form.Amount))-1)#" tabindex="#myTab#"      type="text" id="Amount" size="10" class=notetext2 validate="regular_expression"
pattern="^\d+\.?\d{1,2}?$" message="Please double-check the Amount you entered!">
</CFIF>

and I am getting:

Parameter 1 of function DollarFormat which is now 3,000.00 must be a number  
 
The error occurred in line 41

 
39 : <INPUT type=hidden name=Amount value="#Right(DollarFOrmat(form.Amount),Len(DollarFOrmat(form.Amount))-1)#">
40 : <CFELSE>
41 : $<cfinput name="Amount" value="#Right(DollarFOrmat(form.Amount),Len(DollarFOrmat(form.Amount))-1)#" tabindex="#myTab#"
42 : type="text" id="Amount" size="10" class=notetext2 validate="regular_expression"
43 : pattern="^\d+\.?\d{1,2}?$" message="Please double-check the Amount you entered!"

What is wrong with this?
 
JohnLucaniaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dgrafxCommented:
Why not just do #DollarFormat(form.amount)#?
What is it you are trying to do?
dgrafxCommented:
Thinking about it - I think I can guess whats up.
Use #dollarformat(rereplace(form.amount,"(\$)|(,)","","all"))#

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PluckaCommented:
JohnLucania,

It's saying that form.Amount is 3,000.00 and it doesn't like commas.

<cfset form.Amount = replace(form.Amount, ",", "", "all") />

Put this above line 39 and all should be sweet.

Regards
Plucka
JohnLucaniaAuthor Commented:
Great!!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.