I have a form where I run a lot of error checking. If, when pressing submit, the user recieves an error, I would like to redraw all of the entered values on the form, without forcing the user to retype in the values over again.
On my form, I create an array of default values upon entry. Then, if the user selects a specific value from a drop down list, I remove the default values and insert the values from the selected item.
Here is my problem. I am using Fusebox, and I am passing my variables through the URL method. So, for instance, if an error occurs, I would use something like the following:
<CFLOCATION URL="index.cfm?fuseaction=Project&Error=Please type in a name.">
This works well. But, if I want to display all the values entered by the user when an error occurs. I don't know the correct way in doing so. The only way I know how would be to do something like:
<CFSET ErrorName = #attributes.name#>
<CFSET ErrorID = #attributes.ID#>
<CFSET ErrorPhone = #attributes.phone#>
Then, on my display page, if an error occurs, the value of the text box would be those above values. The problem with this is that my URL varialbe would get a bit long (I would have 10 variables in the URL string so it would be 3 or 4 lines long). This just doesn't seem like it would be the right way to do it.
Any ideas?
On my form, I create an array of default values upon entry. Then, if the user selects a specific value from a drop down list, I remove the default values and insert the values from the selected item.
Here is my problem. I am using Fusebox, and I am passing my variables through the URL method. So, for instance, if an error occurs, I would use something like the following:
<CFLOCATION URL="index.cfm?fuseaction=Project&Error=Please type in a name.">
This works well. But, if I want to display all the values entered by the user when an error occurs. I don't know the correct way in doing so. The only way I know how would be to do something like:
<CFSET ErrorName = #attributes.name#>
<CFSET ErrorID = #attributes.ID#>
<CFSET ErrorPhone = #attributes.phone#>
Then, on my display page, if an error occurs, the value of the text box would be those above values. The problem with this is that my URL varialbe would get a bit long (I would have 10 variables in the URL string so it would be 3 or 4 lines long). This just doesn't seem like it would be the right way to do it.
Any ideas?