PDA

View Full Version : Populating and updating a field with a variable


syrupcore
08-12-2005, 09:17 PM
Hi all,

Brand spankin noob to ColdFusion.

I have a form field that I'm populating with a #variable#. I'm trying to set it up so that you can change that field manually and thereby update the value of the variable. Dang if I can hack out how to do it.

Here's the hack-*** junk I'm trying to work with now: (Don't Laugh! ok, laugh if you must.)
<form name="total" method="post" action="<CFSET cfvTotal>">
<INPUT CLASS="FormText" TYPE="text" NAME="#cfvTotal#" value="#cfvTotal#" SIZE="9" MAXLENGTH="14">
<input type="hidden" name="secret" value="#cfvTotal#"></form>

If you can help, I'd appreciate it more than I can say.

Thank in advance,
Will

nikkiH
08-15-2005, 06:19 PM
You can't.
The variable executes on the server. Once someone can edit, the script is all done executing.
If you need to have user action affect processing, either use javascript and/or a form submit back to the server for re-execution of the script.