You are viewing limited content. For full access, please sign in.

Question

Question

How to show and hide on checkbox

asked on November 30, 2021

Hello,

I want to show and hide the checkbox I create in html but I don't know to create it in the css and JavaScript but I couldn't get it to work. For example If a person want to receive a notification they check yes and list of options will appear or if they choose no and an Note will appear so I how can I create this in code or try a different methods?? 

HIDE 1.JPG
HIDE 2.JPG
HIDE 3.JPG
HIDE 1.JPG (16.77 KB)
HIDE 2.JPG (13.78 KB)
HIDE 3.JPG (23.85 KB)
0 0

Replies

replied on November 30, 2021

Is there a reason you're doing this with a custom html checkbox? It would be substantially easier to accomplish this if you used a built-in checkbox because then you could show/hide with field rules.

0 0
replied on November 30, 2021

Yes, I know I can use the show/hide with field rules but I need the note to pop-up (third image) and I don't know if the is there a way to show the text..

0 0
replied on November 30, 2021

You could just make the text/note portion custom HTML and use the show/hide rules on that piece alone. With the right CSS you could make it look pretty much the same as text below a form input field.

It's important to note that if you add your own checkbox in the custom HTML, the value will not be saved when the form is submitted.

Custom HTML is a static element and not tracked on submission, so any changes, including checking a custom checkbox, would be lost, but if your custom HTML is just the text portion the field rules will still work to show/hide that content.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.