Hi all,
Im sending all my cart variables to a page where folks can make final changes to anything they entered (shipping address, number of products, etc) Most of these variables are passed as hidden form fields to the edit page where they are used to populate input boxes with the same name which can be edited and sent back to the final checkout page again. The problem is that, upon return (after making changes), the variables are not changed but rather added to the previous value in list form. Here is an example.
On the page where the user makes a final check of all the info there is a button called "Edit Info" which sends, among other things, the following hidden variable:
<input type="hidden" name="phone" value="#form.phone#">
The value has been obtained, obviously, from a form that submitted to it. In this example, the value of #form.phone# is 123-456-7890 and has passed correctly as such to the next template (the one where values can be changed). The value is used to populate the following input box:
<cfinput type="Text" name="phone" message="Please enter billing phone with area code." validate="telephone"
required="Yes"
size="15"
maxlength="25"
value="#form.phone#">
On this template is a button at the bottom called "Submit Edits" which sends the field back to the first template with the new value (or with the old one if no change was made. NOW - when it gets back the original template, the code that displays this value (#form.phone#)shows the following value:
123-456-7890,123-456-7890
It has two of this same value! This is happening to all the varibles being sent back (address, name, email, etc). And if the user had made a change to a value then the result is the original value, then a comma, then the new value. Why is this simple passing of form variables causing a list to form?
Im sending all my cart variables to a page where folks can make final changes to anything they entered (shipping address, number of products, etc) Most of these variables are passed as hidden form fields to the edit page where they are used to populate input boxes with the same name which can be edited and sent back to the final checkout page again. The problem is that, upon return (after making changes), the variables are not changed but rather added to the previous value in list form. Here is an example.
On the page where the user makes a final check of all the info there is a button called "Edit Info" which sends, among other things, the following hidden variable:
<input type="hidden" name="phone" value="#form.phone#">
The value has been obtained, obviously, from a form that submitted to it. In this example, the value of #form.phone# is 123-456-7890 and has passed correctly as such to the next template (the one where values can be changed). The value is used to populate the following input box:
<cfinput type="Text" name="phone" message="Please enter billing phone with area code." validate="telephone"
required="Yes"
size="15"
maxlength="25"
value="#form.phone#">
On this template is a button at the bottom called "Submit Edits" which sends the field back to the first template with the new value (or with the old one if no change was made. NOW - when it gets back the original template, the code that displays this value (#form.phone#)shows the following value:
123-456-7890,123-456-7890
It has two of this same value! This is happening to all the varibles being sent back (address, name, email, etc). And if the user had made a change to a value then the result is the original value, then a comma, then the new value. Why is this simple passing of form variables causing a list to form?