You are here: / / Custom field validation
Tagged: Custom Fields
We need to add some validation to custom fields – check that two email fields match before allowing a purchase to go ahead.
I have tried adding <script> tags to the description which should accept html according to documentation but these are being rendered as text – possibly for security reasons.
Custom validation should be possible according to this post:
Can you let us know how to achieve this please?
This can be achieved by writing a custom add-on that will handle this.
I have quickly composed an example add-on for you – https://github.com/Arsenal21/stripe-payments-enhancements/releases/tag/0.0.12. Just download .zip file and install it as a normal WP plugin.
The add-on checks if custom field and email field match. If not, it shows error and blocks form submit. Feel free to alter it per your needs.
That’s fantastic – thank you.
And thanks for the quick response!
You must be logged in to reply to this topic.