Jump to content
Latest News: (loading..)
dennish

Clearing form fields on checkout_payment.php - Empty values not accepted, old inputs persisting

Recommended Posts

I noticed some particular behaviour on checkout_payment.php:

  • first I entered some text in the field Comments e.g. Test 123
  • then I proceeded to checkout_confirmation.php and used the Change button (at the Comments section) to return to checkout_payment.php to edit my previous input in the field Comments
  • If I change the text to Test, the field is updated correctly (as shown on checkout_confirmation.php) > the 123 part is removed
  • If I remove the entire text instead (clearing the field) and proceed again to checkout_confirmation.php the old input Test 123 is still shown

My conclusion: an empty value (for the session variable) is not accepted by osCommerce, when the form is (re)submitted to update a previously entered value.

Note: I used a clean osC 2.3.4.1 installation to confirm the described behavior

On my own website I use the Agree to terms extension. There I experience the same behaviour: needless to say that it is unacceptable that a customer can untick the checkbox when he returns to checkout_payment.php and can nevertheless proceed to checkout_confirmation.php, because the session variable is not updated (and osC thus regards the checkbox as still being ticked).

Who can shed some light on this issue (and suggest a solution)?

Kind regards,

Dennis

Edited by dennish

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×