Home › Forums › Calendar Products › Community Events › Event form Email format verification
- This topic has 7 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
February 1, 2013 at 1:38 am #31927
clubbingpriest
ParticipantHow to have a email verification format on the email field of the organizer section, right now we can enter anything without @domain.com and the form accept it
Please advise
JEAN LOUISFebruary 1, 2013 at 9:01 am #31955Casey
ParticipantThanks for reaching out! You can use some jQuery to validate the email address when the submit button is clicked.
First, you’ll need to perform a template override and putting a copy of event-form.php into this directory: ‘YOUR_THEME_DIR/events/community/’.
Then add this inside the script block on line 18:
https://gist.github.com/4692585
Let me know if that gets the job done. Thanks!
February 2, 2013 at 4:57 am #32009clubbingpriest
ParticipantHI Casey
I did add the jQuery script on the event-form.php but the function did Here the codejQuery(‘.events-community-submit’).click(function() {
var pattern = new RegExp(/^((([a-z]|\d|[!#\$%&’\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&’\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);
if(jQuery(‘#OrganizerEmail’).val() != “”) {
if(!pattern.test(jQuery(‘#OrganizerEmail’).val())) {
alert(‘Please enter a valid email address.’);
jQuery(‘#OrganizerEmail’).select();
jQuery(‘#OrganizerEmail’).focus();
return false;
}
}
});jQuery(document).ready(function() {
jQuery(‘#show_hidden_categories’).click(function() {
//jQuery(‘#event-categories’).css(‘overflow-y’, ‘scroll’);
jQuery(‘.hidden_category’).show(‘medium’);
jQuery(‘#show_hidden_categories’).hide();
return false;});
//Code to select desired default hour
jQuery(‘select[name=”EventStartHour”]’).val(’23’);
jQuery(‘select[name=”EventEndHour”]’).val(’06’);
});…..etc….
February 2, 2013 at 9:34 am #32014clubbingpriest
ParticipantSorry I did not finish my message
I inserted the jQuery but the function do not workFebruary 4, 2013 at 2:08 pm #32103Casey
ParticipantJean,
Try replacing your entire event-form.php file with this: https://gist.github.com/4710137Let me know if that does the trick. Thanks!
February 5, 2013 at 1:25 am #32129clubbingpriest
ParticipantHI Casey,
Thank you this is workingFebruary 5, 2013 at 4:58 am #32135Casey
ParticipantThanks for confirming that this got you sorted. Unless you disagree, I’m going to mark this thread “Answered” and close it out.
We really appreciate your support and please let us know if you need anything else in the future. If you find yourself with a few minutes and would be so kind as to give us a “Works” rating or a positive star voting on the WordPress.org repo (http://wordpress.org/extend/plugins/the-events-calendar/), or even a shoutout to your followers on Facebook or Twitter, it would mean a lot to us. Thanks again for using the plugin.
July 7, 2015 at 6:26 am #978550Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Event form Email format verification’ is closed to new replies.
