AAA, NAC, Guest Access & BYOD

 View Only
last person joined: one year ago 

Solutions for legacy and existing products and solutions, including Clearpass, CPPM, OnBoard, OnGuard, Guest, QuickConnect, AirGroup, and Introspect

How to restrict email/sponsor_email field in guest self registration form to not accept specific email address. 

Nov 10, 2014 08:18 AM

Introduction : We have seen requirements to restrict list of email address in sponsor_email field during guest self registration. This article will help to validate the field value using a simple Java Script.

 

Environment : Supported on all Amigopod/ClearPass Guest versions.

 

Configuration Steps :

 

Step 1: In the below script, replace the form name with actual guest self registration page/form name. You could obtain the form name by navigating to ClearPass Guest >> Configuration >> Guest Self-Registration >> Select the registration page >> click on Edit and locate the form name as shown below.

rtaImage.png

<script type="text/JavaScript"><!--{literal}
function RegisterSubmit(form_name) {
    var frm = document.forms[form_name];
     var error = 'Please enter a valid Email';
            //converting the sponsor_email filed value to lower case here...
            var temp1= frm.sponsor_email.value.toLowerCase();
    
            //Validating the field value/email address here...
          if(temp1 == "xyz@arubanetworks.com" )
//Multiple email addressed can be added using "||". Eg: if(temp1 == "xyz@arubanetworks.com" || temp1 == "abc@arubanetworks.com" || temp1 == "bcd@arubanetworks.com"  )
   {
   alert(error);
          Nwa_EnableFormButtons(guest_register);
        return false
                   }
                      else{
                      return true;
                      } }
//-->  

{/literal}</script>   

The above script don't allow the value/email "xyz@arubanetworks" in the Sponsor Email field.

Step 2: Copy and paste the script in the register page footer by navigating to Configuration >> Guest Self-Registration >> Select the registration page >> Edit >> Register Page >> Footer >> Footer HTML.


rtaImage.png

rtaImage.png


Step 3: Add the function name "RegisterSubmit" to the submit field in the same form by navigating to Configuration >> Guest Self-Registration >> Select the registration page >> Edit >> Register Page >> Form >> select the "submit" field >> Edit >> Advanced Properties >> AJAX Submit: >> ente the text "RegisterSubmit".

rtaImage.png

rtaImage.png

 

Answer : After the completion of above customization, the sponsor email field won't accept the restricted email addresses during the registration.

Statistics
0 Favorited
6 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.