10-02-2018 08:50 AM
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>
Solved! Go to Solution.
10-04-2018 08:20 AM
10-03-2018 11:47 AM
10-03-2018 12:58 PM
Thank you Jason, much appreciated. Please let me know if you need any more information on it.
10-04-2018 08:20 AM
10-04-2018 05:16 PM
Thank you very much Jason, new script worked!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide