cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
705
Views
0
Helpful
7
Replies

on Registration Form additional Button to....

jacob.parker
Level 1
Level 1

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

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

View solution in original post

7 Replies 7

Jason Kunst
Cisco Employee
Cisco Employee
Please explain further exactly what you’re needing to happen

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>

 

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

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?

Hi Jason, 

yes - that was my aim.

But i deprecated my idea to do this. 

 

Thanks for your help

 

Kind regards

Jacob 

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

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