ChenXiu Posted July 21, 2021 Share Posted July 21, 2021 (edited) Customer submits their address to receive a prepaid shipping label, then clicks the "Complete Order" button. The return address they input gets validated using PHP, cURL, and a 3rd party validation service. And, of course, I use CSS to lay out the result 😁 Example: the validator suggests a minor change like "avenue" instead of "street." Question: Which of these is "best practice" (and a better visitor experience): a.) Validate behind the scenes and issue the corrected label with NO alerts or fanfare (e.g. the label will the amend "street" to "avenue")?b.) Validate and then re-display the same styled input field layout, but with the corrections highlighted. Included at the bottom, in small font, will be whatever they originally input along with a "checkbox" to override the validator. Then they can click the "Complete Order" button again.c.) Validate, but instead of displaying the same styled input field layout, a brand new layout appears with an "A" and "B" choice (their original input, versus the validated input). Then they choose one of those (either by checkboxing one of them and then clicking "Complete Order," or, by converting the "A" and "B" choices into actual buttons they would click to complete the order. Spending years trying to learn and relearn PHP has destroyed the "user experience" side of my brain 😀 Thank you. Any suggestions would be appreciated. Edited July 21, 2021 by ChenXiu Quote Link to comment https://forums.phpfreaks.com/topic/313408-opinion-address-verification/ Share on other sites More sharing options...
Solution requinix Posted July 21, 2021 Solution Share Posted July 21, 2021 For these sorts of questions it's often a good idea to see what other sites (eg, Amazon) do, then consider whether their solution makes sense to your site. 40 minutes ago, ChenXiu said: a.) Validate behind the scenes and issue the corrected label with NO alerts or fanfare (e.g. the label will the amend "street" to "avenue")? No. 1. Don't change stuff the user inputted without them knowing. It's confusing. 2. The address verification service could be wrong. It's happened to me. 41 minutes ago, ChenXiu said: b.) Validate and then re-display the same styled input field layout, but with the corrections highlighted. Included at the bottom, in small font, will be whatever they originally input along with a "checkbox" to override the validator. Then they can click the "Complete Order" button again. Not sure what you're describing. 43 minutes ago, ChenXiu said: c.) Validate, but instead of displaying the same styled input field layout, a brand new layout appears with an "A" and "B" choice (their original input, versus the validated input). Then they choose one of those (either by checkboxing one of them and then clicking "Complete Order," or, by converting the "A" and "B" choices into actual buttons they would click to complete the order. Showing the "fixed" and original addresses and asking them to pick (or to edit/enter a new one) is probably the most common solution. Quote Link to comment https://forums.phpfreaks.com/topic/313408-opinion-address-verification/#findComment-1588470 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.