06-23-2016 11:34 AM
My customer is looking to provide guest access to self-register their own account. When the guest submit the request it goes to the the sponsor's email (person being visited) and the sponsor will then print out the guest credentials and hand it to the guest.
I was able to change some fields around but also want to restrict email domain as the guest could easily send the login to his/her personal email and bypass the system. So I want to limited the sending to email domain only to the Company's email domain (basically the guest must always send to Corporate email domain.
Solved! Go to Solution.
06-23-2016 11:41 AM
The solution is to do the following:
Under portal page settings
Self-reg page
Under Portal page customization
self-reg page
To validate the email address use the following code
This code is placed in the Optional Content 2 area of the Self-registration page when under the HTML editor (far right on the actions bar):
<script>
setTimeout(function(){
$.validator.addMethod("customemailvalidator", function(value, element) {
return /^\w+@cisco\.com$/.test( value );
}, 'Please enter a valid email.');
jQuery("[name='guestUser.fieldValues.ui_email_address']").rules("add",{customemailvalidator:true});
}, 50);
</script>
You can change orange string on your email domain. For example: "foo\.com", "bar\.gov"
06-23-2016 11:41 AM
The solution is to do the following:
Under portal page settings
Self-reg page
Under Portal page customization
self-reg page
To validate the email address use the following code
This code is placed in the Optional Content 2 area of the Self-registration page when under the HTML editor (far right on the actions bar):
<script>
setTimeout(function(){
$.validator.addMethod("customemailvalidator", function(value, element) {
return /^\w+@cisco\.com$/.test( value );
}, 'Please enter a valid email.');
jQuery("[name='guestUser.fieldValues.ui_email_address']").rules("add",{customemailvalidator:true});
}, 50);
</script>
You can change orange string on your email domain. For example: "foo\.com", "bar\.gov"
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: