0

I am creating a SharePoint form and I have a few check-boxes and based on if the checkbox is checked or not an additional column appears.

But I can't get to hide that additional column if then box is not checked, can anyone help?

  • 1
    How are you getting the additional column to show? Can you post an example of your code? – Dylan Cristy Aug 21 at 17:01
  • Can you please add the code you are using to your question? – Ganesh Sanap Aug 22 at 12:01
1

Sample demo to show/hide column(row) based on checkbox click event.

<script type="text/javascript">
    $(function () {
        //MultiChoice Field static name
        $('input', 'table[id^="MultiChoice"]').each(function () {
            $(this).change(function () {
                if (this.checked) {
                    //Option  field title
                    $('nobr:contains("Option")').closest('tr').hide();
                } else {
                    $('nobr:contains("Option")').closest('tr').show();
                }
            });
        })
    })
</script>

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.