cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2313
Views
5
Helpful
4
Replies

Cisco ISE 2.4 Guest Portal - Custom dropdown box for sponsor email - sponsor email being added to guest email - invalid format

apishko
Level 4
Level 4

Hoping someone could lend a further hand on this issue, using ISE version 2.4

 

Working on trying to add the option in Cisco ISE Guest Registration portal where rather than the end user having to type in the sponsor's email address there is a dropdown box listing the sponsors and the guest user attempting to register can just select a sponsor and click on submit.  I am using a script that I found in these message boards created by Justin Kunst (thanks Justin), however, when the guest trying to register clicks on submit, the sponsor's email address is inserted into the email address field that the registering guest user had filled out, then I get an error that the email address is in an invalid format.  As an example the email address field will appear as userx@xyx.com , userY@sponsoremail.com

 

Thank you all in advance for any assistance.

 

 

Script I am attempting to use is as follows:

 

<script>

 

 

 

(function(){

 

 

setTimeout(function(){

 

 

//Put your data here. Left side is visible to user - should be a name. Right side email address.

 

 

var persons = {

 

 

    ‘Sponsor 1’: ‘email1@gmail.com’,

 

 

    'Sponsor 2': 'email2@gmail.com'

 

 

}

 

 

jQuery("input[name='guestUser.fieldValues.ui_reason_visit']").parent().hide();

 

 

jQuery("input[name='guestUser.fieldValues.ui_reason_visit']").parent().after("<div class='ui-select'><div data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' data-icon='arrow-d' data-iconpos='right' data-theme='a' class='ui-btn ui-shadow ui-btn-corner-all ui-btn-icon-right ui-btn-up-a' id='outerDiv'><span class='ui-btn-inner'><span class='ui-btn-text'><span id='displayName'></span></span><span class='ui-icon ui-icon-arrow-d ui-icon-shadow'> </span></span><select name='guestUser.fieldValues.ui_email_address' id='guestUser.fieldValues.ui_email_address' class='ui-body-a'></select></div></div>");

 

 

jQuery.each( persons, function( key, value ) {

 

 

jQuery('#guestUser\\.fieldValues\\.ui_email_address').append("<option value="+value+">"+key+"</optipn>");

 

 

});

 

 

jQuery('#guestUser\\.fieldValues\\.ui_email_address > option:first-child').attr('selected', 'selected');

 

 

jQuery('#guestUser\\.fieldValues\\.ui_email_address').on('change', function(evt){

 

 

jQuery("#guestUser\\.fieldValues\\.ui_reason_visit").val(jQuery(this).val());

 

 

jQuery('#displayName').html(jQuery(this).find('option:selected').text());

 

 

});

 

 

jQuery('#guestUser\\.fieldValues\\.ui_email_address').trigger('change');

 

 

},250);

 

 

})();

 

 

</script>

1 Accepted Solution
4 Replies 4

Jason Kunst
Cisco Employee
Cisco Employee
investigating this

Thank you Jason, much appreciated.  Please let me know if you need any more information on it.

Thank you very much Jason, new script worked!