Skip to main content

Hide a custom Field that will only Display if the box is checked on a current custom field

Comments

2 comments

  • Wes Kliewer

    Thank you for posting this request. I have moved this topic to a discussion from a feature request because it can be done using JavaScript to hide/unhide data fields on the form. While we have examples for other custom JavaScript functions on a form I was unable to find one for this rather useful suggestion. Our team is reviewing it and we will have some examples in response shortly.

    0
  • Wes Kliewer

    You'll need to familiarize with the Custom Javacript for a Form to load the customized script referenced below each time the project is added/edited.

    Place the following script into the project form after replacing the ID references in the example with the IDs for your custom data fields. For example, your CustomFieldCheckBoxID would be something that looks like cft_i14_cf14

    $( document ).ready(function() {
            
    if(!$("#CustomFieldCheckBoxID").is(":checked")){
    $("#EmailFieldID").hide();
    $("#EmailLabelID").hide();
    }

    $("#CustomFieldCheckBoxID").click( function() {
    if($("#CustomFieldCheckBoxID").is(":checked")){
    $("#EmailFieldID").show();
    $("#EmailLabelID").show();
    }
    else{
    $("#EmailFieldID").hide();
    $("#EmailLabelID").hide();
    }
    });
     
            });

     

    0

Please sign in to leave a comment.

Powered by Zendesk