Checkbox dynamic select [REQUIRED]

Hey there,

I’m totally new in creating forms with Gravity. So hopefully someone can help me out with this. As you can see in the image below I have a checkbox and want to say this checkbox: if (for example) “Einzelberatung BU” is selected and you want to select another field with the term “Einzelberatung…” then the field “Komplettes Finanzkonzept” automatically should be selected and the both other fields should be deselected.

Could anyone help me out with that?

Bildschirmfoto 2021-03-23 um 16.30.59

Your best bet here is just writing a little custom JS to handle your desired logic. Here’s an example where you can check Red and Blue together but Green can only be selected by itself.


:clap: :clap: :clap:

1 Like

Hey David, you’re the man! Thanks so far for your help, I really appreciate your work.
But how does the code look like if I say I’ve selected the Red button and decide to also select the Blue button and then the Blue and Red button should be deselected and the Green button selected? So when you decide to select a 2’nd button the logic automatically switch to the 3’rd Green button?

Happy to help, Leon. Here’s an example that will check Green if Red & Blue are checked (and simultaneously uncheck Red and Blue). It also will prevent Red & Blue from being checked until Green is unchecked.

Hey David, thanks again for your awesome help. I adjusted now your javascript code to my needs but unfortunately it’s not working. I guess I made something wrong inside the javascript file. Thats why I will attach it here:

I pasted the javascript code into the Gravity forms plugin you developed, just to make sure the code was in the right place.

Looks like you were able to get some additional help on StackOverflow! Posting a link to that here for other users looking to do the same. :slightly_smiling_face:


Hey David, yeah I were able to find someone who could help me out with that. Really appreciate your help and engagement. :slight_smile:

1 Like