2

Basically my problem is I wanted to retrieve the input values prior to submitting the cart so when an error is encountered, the values entered by the customer will still be in the form. Something like how the Codeigniter form validation library does. Is this possible?

1 Answer 1

2

You should be able to use the value attribute to recall the value entered into the form field like this:

<input type="text" name="order_custom1" value="{order_custom1}" />

In this case I'm using order_custom1 as an example but the same can apply for any any order field. You may wish to also wrap it in a conditional to check if there is any value before displaying:

<input type="text" name="order_custom1" value="{if order_custom1}{order_custom1}{/if}" />
1
  • And for most simple text fields you can just use {field:order_custom1} Commented Jul 19, 2013 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.