/t5/coldfusion-discussions/stupid-question-cannot-dispay-coldfusion-variable/td-p/86019Dec 28, 2008
Dec 28, 2008
Copy link to clipboard
Copied
I can't get a variable to display, if I dont use cfparam to
put a default value of blank in order to declare the value I get an
error, and if I use cfparam this way each time a form is submitted
the page reloads and the variable is empty due to the declaration??
/t5/coldfusion-discussions/stupid-question-cannot-dispay-coldfusion-variable/m-p/86021#M8577Dec 29, 2008
Dec 29, 2008
Copy link to clipboard
Copied
LATEST
lovewebdev wrote:
> I think I figured it out. The only way to rewrite the
variable is by using
>
> cfset
Yes <cfparam...> does not rewrite a variable. The
documentation would
have a good explanation of this. The purpose of
<cfparam...> is to
include implicit *if* logic. If this variable does not
already exist
then create it with this value.