Registration form validation
-
Hi all…
I have three related fields in my custom registration form;
[check box] Do you want to receive text messages?
[phone#] My cell phone number
[provider] My service providerDuring registration and profile updates, when the user selects save or submit, I want those fields to be validated so if any of the three have data filled in while others do not, an error would pop-up.
I am pretty terrible with php but have done a few things.
I am looking for something along the lines of: If $checkbox && empty($phone# or $provider) then error message. Or I suppose for more accuracy it could be three elseif statements.The basic questions are, can someone give me or point me to some sample code and more important, where would I put the code? In s2hacks.php?
In fact I have some code which runs during new and modified profiles using:
add_action during_paypal_notify_during_subscr_signup_w_update_vars
add_action during_paypal_notify_during_subscr_modifyIf s2hacks.php, would I create another function within the same add_action section or would this be a completely new section?
fyi, I am running S2member pro.
Many thanks, DP
The topic ‘Registration form validation’ is closed to new replies.