Occasional Contributor II

ClearPass Guest Form Field Editor

Is there a way to enable a field in the guest registration form based on the 'click' event?  I would like to have the checkbox field 'creator_accept_terms' not be enabled to the user until they click on the link 'terms and conditions'.  It seems with the Validator fields, there should be a way to validate if they click on a link, then the field becomes enabled?  

Aruba Employee

Re: ClearPass Guest Form Field Editor

Forcing stuff like this on users is not very user-friendly, but there is a code snippet I posted on Arubapedia for Partners:


Note the ID we added for the terms of use link (id="terms_of_use_link"); edit your creator_accept_terms field OR make this a custom override for your web login terms checkbox:


I accept the <a href="{nwa_global name=guest_account_terms_of_use_url}" id="terms_of_use_link" target="_blank">terms of use</a>.
<br />(Note: you <strong><u>must</u></strong> click the terms link above in order to proceed!)

And the code for the form manipulation:

{nwa_script src=jquery.min} {literal} <script> $('#ID_'+_form_name+'_visitor_accept_terms').prop('disabled', true); // disable the checkbox $(document).on("mousedown", "#terms_of_use_link", function(e) { if( e.button <= 2 ) { $('#ID_'+_form_name+'_visitor_accept_terms').prop('disabled', false); // enable the checkbox if link was clicked } }); </script> {/literal}

Remember, the form manipulation should go in the FOOTER HTML, so it occurs after the initial page/form draws.


Search Airheads
Showing results for 
Search instead for 
Did you mean: