Reputation: 333
In coldfusion, in the hidden values of a form I get two values:
<input type="hidden" name="EST_VAL" value="#EST_VAL#" />
<input type="hidden" name="DOWN_PMT" value="#DOWN_PMT#" />
I need to find the value of EST_VAL subtracted from DOWN_PMT and assign it to this value:
<input type="hidden" name="LOAN_VAL" value="#LOAN_VAL#" />
I know how to do this in PHP, but I'm not sure if I should use a cfset, or cffunction in coldfusion.
Upvotes: 0
Views: 326
Reputation: 5598
CFSET should be all you need for this. Without seeing the other code in this file/script, a simple approach/solution would entail the following:
<cfset LOAN_VAL = EST_VAL - DOWN_PMT />
That would then output the value of the LOAN_VAL variable in the hidden field tag you note in your original post.
Upvotes: 4
Reputation: 7193
you can do this inline with pound signs like so:
<input type="hidden" name="LOAN_VAL" value="#EST_VAL-DOWN_PMT#"/>
Upvotes: 7