cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
 
Register for the monthly ISE Webinars to learn about ISE configuration and deployment.
Choose one of the topics below to view our ISE Resources to help you on your journey with ISE

This community is for technical, feature, configuration and deployment questions.
For production deployment issues, please contact the TAC! We will not comment or assist with your TAC case in these forums.
Please see How to Ask the Community for Help for other best practices.

127
Views
0
Helpful
7
Replies
Beginner

on Registration Form additional Button to....

Hi community, 

on the registration form i need an additional button,

which hide or show form fields. 

 

Is anybody there who can give me a hand?

 

Kind Regards
Jacob

1 ACCEPTED SOLUTION

Accepted Solutions
Beginner

Re: on Registration Form additional Button to....

no - i don't needing it. I choose another solution for this.  

View solution in original post

7 REPLIES 7
Cisco Employee

Re: on Registration Form additional Button to....

Please explain further exactly what you’re needing to happen
Beginner

Re: on Registration Form additional Button to....

i upload two pictures. 

1. guest-portal.standard

2. guest-portal.half_year

 

guest-portal.standard

guest-portal.standard.png

guest-portal.half_year

guest-portal.half_year.pngThe guest portal form fields is the standard registration form for one week access. On this form the location form field is not needed and i set it on hidden. 

 

But now the guests must have the ability to show the location form field, because it's a must for the process to sort the request to the proper department. 

 

aim:

If the guest click the 'register for a half year' button, then the location form field should be visible on the registration form. 

 

My script looks like this:

<script>
(function(){
setTimeout(function(){

//Script for dropdown weekly/quarterly & sms formularfield not required !!

var persons = {

'xxxxxxxxxx':'xxxxxxxxx',
'aaaaaaa':'aaaaaaaaa',
'city':'city',
'location':'location'
}


jQuery('#guestUser\\.fieldValues\\.ui_phone_number').attr("class","");

jQuery("input[name='guestUser.fieldValues.ui_company']").parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_duration_text']").parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_phone_number']").parent().hide();
jQuery("input[name='guestUser.fieldValues.ui_location']").parent().hide();

 

 

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

jQuery("input[name='guestUser.fieldValues.ui_duration_text']").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_duration_text' id='guestUser.fieldValues.ui_duration_text' class='ui-body-a'></select></div></div>");

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

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

});

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

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

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

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

});

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

},250);

})();

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

//----------------------------
//jQuery('#guestUser\\.fieldValues\\.ui_phone_number').attr("class","");

jQuery("#guestUser\\.fieldValues\\.ui_phone_number").attr("value", "+49 173 123456789");
jQuery("#guestUser\\.fieldValues\\.ui_phone_number").parent().attr("type", "Phone");

//jQuery("#guestUser\\.fieldValues\\.ui_location").sort();

setTimeout(function(){


$.validator.addMethod("customemailvalidator", function(value, element) {


return /^(\w+\.?)+@xxxxxxxxxx\.com$/.test( value );


}, 'Please enter a valid email xxxxxxxxxxxx domain.');

 


jQuery("[name='guestUser.fieldValues.ui_person_visited']").rules("add",{customemailvalidator:true});


}, 50);

//------------------------------------------------

 

</script>

 

Beginner

Re: on Registration Form additional Button to....

second registration form should be for a half year duration. That will sponsors people edit.
Cisco Employee

Re: on Registration Form additional Button to....

ok someone is looking at that, its rather a funny ask. It seems like you want a button that gives user option to select standard or half year and returns different location information depending on that choice?
Beginner

Re: on Registration Form additional Button to....

Hi Jason, 

yes - that was my aim.

But i deprecated my idea to do this. 

 

Thanks for your help

 

Kind regards

Jacob 

Highlighted
Cisco Employee

Re: on Registration Form additional Button to....

Sorry I don’t understand deprecated your idea? Are you no longer needing this?
Beginner

Re: on Registration Form additional Button to....

no - i don't needing it. I choose another solution for this.  

View solution in original post