Site URL: https://cone-raccoon-plbt.squarespace.com/config/settings/advanced/code-injection
I just want to have the register's be able to click "yes" in the checkbox and additional fields pop up to add more people with their information, and when "yes" is deselected, the information that was added disappears. If they click "no" then nothing happens. Currently, the "yes" adds the information, but when you deselect, nothing happens. When "no" is checked, the entire form disappears. I need help....
<style>
#name-6a41b18c-53ef-4e09-a7e1-36a8a44d66ae,
#email-ef3069e6-ed8d-485b-8122-415adba6e0b2,
#phone-683a6bf2-d5c5-4f67-a80c-bf1514902460,
#text-68e3fadc-13a1-4f5e-872d-cc617f41fdb3,
#checkbox-9c352e37-6923-40d9-a177-d01ee9efdb96,
#checkbox-0f847181-fa76-4ea2-9b47-31b148155a9d {
display: none;
}
</style>
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"></script>
<script>
$('#checkbox-731a364b-ad8f-4d92-b3a7-c3fe55fddcae input').click(function() {
selection = $(this).val();
if (selection == 'Yes') {
$('.form-item').show();
}
else
if (selection == 'No') {
$('.form-item').hide();
}
});
</script>