Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

ClearPass Guest Form Field Editor

This thread has been viewed 1 times
  • 1.  ClearPass Guest Form Field Editor

    Posted May 30, 2017 05:07 PM

    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?  



  • 2.  RE: ClearPass Guest Form Field Editor
    Best Answer

    Posted May 31, 2017 03:05 PM
      |   view attached

    Forcing stuff like this on users is not very user-friendly, but there is a code snippet I posted on Arubapedia for Partners:
    https://arubapedia.arubanetworks.com/afp/index.php/Terms_and_Conditions_on_ClearPass#Detect_if_terms_link_was_clicked_or_opened

     

    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.

    force_terms_of_use_link.png