|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Question on form variables
Hi All -fun and learning 09/07/10 02:36 P Setting a variable into the FORM scope on page one, will not automaticallyAndy Matthews 09/07/10 02:50 P Yes, I am setting the hidden variablesfun and learning 09/07/10 02:57 P So you're saying that when you inspect the FORM scope, by cfdumping it, onAndy Matthews 09/07/10 03:01 P Yes, you are right.fun and learning 09/07/10 03:07 P Are you cfparaming those variables at the top of page two?Andy Matthews 09/07/10 03:13 P Thank you All..There was some other place where this variable was getting overwritten...fun and learning 09/07/10 03:52 P My guess is that you've not set the method attribute in your form to "post", the default is "get" if not set.Matthew 09/07/10 03:29 P Any chance you could just share your code with us so we can stop guessingAlan Rother 09/07/10 03:45 P If that were the case then why would the var names show up in the cfdump forAndy Matthews 09/07/10 03:56 P it was happening as below:fun and learning 09/07/10 04:01 P Hi All - This might be a silly question, but I am confused with below scenario...I have some form variables set on a page, and clicking on submit button, I go to second page, where I am dumping these form variables...Some of the variable values show up as empty string, but when I see the form variables in the coldfusion debugging section, all the variable values are set. Am I missing something here? Setting a variable into the FORM scope on page one, will not automatically put those variables, or their values, into the FORM scope on page two. You'd need to add a hidden form field on page one, and populate it's value from the FORM variable you're creating. Hi All - This might be a silly question, but I am confused with below scenario...I have some form variables set on a page, and clicking on submit button, I go to second page, where I am dumping these form variables...Some of the variable values show up as empty string, but when I see the form variables in the coldfusion debugging section, all the variable values are set. Am I missing something here? Yes, I am setting the hidden variables ----- Excess quoted text cut - see Original Post for more ----- So you're saying that when you inspect the FORM scope, by cfdumping it, on page two that the variables are there? But when you output them by themselves (FORM.varOne) they're empty? andy Yes, I am setting the hidden variables >Setting a variable into the FORM scope on page one, will not >automatically put those variables, or their values, into the FORM scope on page two. ----- Excess quoted text cut - see Original Post for more ----- Yes, you are right. ----- Excess quoted text cut - see Original Post for more ----- Are you cfparaming those variables at the top of page two? Are you cfincluding any code that might overwrite those variables? andy Yes, you are right. ----- Excess quoted text cut - see Original Post for more ----- Thank you All..There was some other place where this variable was getting overwritten... ----- Excess quoted text cut - see Original Post for more ----- My guess is that you've not set the method attribute in your form to "post", the default is "get" if not set. Sent from my iPhone On 7 Sep 2010, at 20:00, fun and learning <funandlrnng10@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more ----- Any chance you could just share your code with us so we can stop guessing about it? =] ----- Excess quoted text cut - see Original Post for more ----- If that were the case then why would the var names show up in the cfdump for the FORM scope? My guess is that you've not set the method attribute in your form to "post", the default is "get" if not set. Sent from my iPhone On 7 Sep 2010, at 20:00, fun and learning <funandlrnng10@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more ----- it was happening as below: <cfif isDefined("URL.var1")> <cfset Form.var1 = URL.var1> <cfelse> <cfset Form.var1 = ""> </cfif> ----- Excess quoted text cut - see Original Post for more -----
|
February 08, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||