LawrenceBeckwith Posted October 23, 2020 Share Posted October 23, 2020 Site URL: https://swordfish-tambourine-xk3b.squarespace.com/customise-custom-1 Hi there, I'm trying to use javascript to improve the UX of my product order page. I have a product form with a number of select boxes ("Type of wood", "Wood finish" etc) to select different product options. In the product description I have photos of those different images. I am proficient with Javascript and I have been succesfull in hacking this functionality. If you click the photos, the select boxes are changed to your selection (it also puts a border around your chosen selection and this border is changed if you manually change the option in the select box). However, if you try to submit the form, an error pops up saying "You must select options", despite the options being selected. If you then manually touch the select boxes, the error no longer pops up and you can submit the form. I have a feeling that this might be because you are using some sort of state management solution in the background (React?) or something like that. So my question is: is there a way that I can stop this error from occuring? If I'm right about it being a state management solution, is there a hack for it? A way to change the options directly with the state manager perhaps? Many thanks, Ben Jackson (a web developer working on behalf of Lawrence Beckwith) Link to comment
tuanphan Posted October 25, 2020 Share Posted October 25, 2020 Already have a plugin for this, you can try analyzing their code at the demo site. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
LawrenceBeckwith Posted October 26, 2020 Author Share Posted October 26, 2020 Thanks for the suggestion @tuanphan. I had a look and it looks like they are probably using some code minification on their side so the code is not really possible to reverse-engineer (for me at least). Thanks anyway. If you have any other suggestions, please let me know. Ben Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.