Posted: August 25, 2020 at 5:32 pm
(NOTE: I am resubmitting this topic because for some reason I can’t reply to my original topic post – I get logged out of my account automatically as soon as I click on the link for my post – not sure why) MY ORIGINAL POST I would like to compare this input Company Code to a Company Code that is provided on the Event page itself via Custom Field. If they don’t match I would like to highlight the field and put an error message underneath it (just like your default behavior for required fields) So here is a snippet of code in my submit override method in my PHP plugin: … // Get the input client code // Then compare them and if they don’t match display a field level error Hopefully you get the idea. So how can highlight the field and display an error message underneath it in PHP if the 2 codes don’t match? OR is there a better way to implement this that I am not seeing? Thanks in advance, TONY’S REPLY Sounds like you could use the FHEE__EE_SPCO_Reg_Step_Attendee_Information___process_registrations__pre_registration_process hook to do what you are requesting. That allows you to stop processing and return an error onto the page, you can also specify which field your error should target. ************ Thanks, Mark |
|
PLEASE DELETE OR CLOSE THIS POST. It is a duplicate of my other one that now seems to be working properly for posting a reply. |
|
Closing this out, see: https://eventespresso.com/topic/how-to-handle-registration-form-error-display-elegantly/ |
|
The support post ‘How to handle registration form error display elegantly (2)’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.