Hello,
I'm collecting a few custom order fields on my OCST screen by adding additional form elements. My issue is that when there is an error submitting the form, such as a customer missing a field or entering an invalid phone number, Miva returns an error and returns me to the OCST screen. The first time this error occurs my form inputs are fine, the second time, they are doubled (separated by commas), the third, they are tripled, etc. Examples below
I've also noticed that looking at the form data passed when the continue fails, my custom fields are duplicated. So the form data inspector in my browser shows something like this after the first submission:
After the second submission it changes to this:
which causes the form input to then concatenate the form data with the same name and show "showtext,sometext"
then the third:
and so forth.
Why are these duplicate form inputs being passed around? I've checked many times, and there are definitely not duplicate input elements on the page. I'm declaring the inputs like this:
I'm collecting a few custom order fields on my OCST screen by adding additional form elements. My issue is that when there is an error submitting the form, such as a customer missing a field or entering an invalid phone number, Miva returns an error and returns me to the OCST screen. The first time this error occurs my form inputs are fine, the second time, they are doubled (separated by commas), the third, they are tripled, etc. Examples below
I've also noticed that looking at the form data passed when the continue fails, my custom fields are duplicated. So the form data inspector in my browser shows something like this after the first submission:
Code:
myfield = "" Action = "ORDR" SCREEN = "OSEL" .... myfield = "sometext"
Code:
myfield = "sometext" Action = "ORDR" SCREEN = "OSEL" .... myfield = "sometext"
then the third:
Code:
myfield = "sometext,sometext" Action = "ORDR" SCREEN = "OSEL" .... myfield = "sometext,sometext"
Why are these duplicate form inputs being passed around? I've checked many times, and there are definitely not duplicate input elements on the page. I'm declaring the inputs like this:
Code:
<mvt:if expr="NOT ISNULL g.myfield">
<input type="text" name="myfield" class="textfield" value="&mvt:global:myfield;"/>
<mvt:else>
<input type="text" name="myfield" class="textfield" value=""/>
</mvt:if>