Skip to main content
Known Participant
April 19, 2023
Question

Limiting checkboxes based on radion selection

  • April 19, 2023
  • 1 reply
  • 281 views

Hi guys. Thanks for always helping me out.

 

I am making a form and it have 6 packages for which i have added radio button so customer can select any one package.

 

However I have 6 to 7 list of checboxes which i wanted to be limited based on radio.

 

Example: Package 1 includes 2 fruits and 3 veggies

Package 2: 5 fruits and 4 veggies

 

I have 2 list. No. 1 fruits with more than 5 to 10 fruits to be selected and No.2 veggies.

 

Now, when Package 1 is selected, list of fruits checboxes needs to be limited to 2 selections only and list of veggies checboxes needs to be limited to any 3 veggies selection. Similarly if package 2 is selected, fruits checboxe should limit the selection to 5 and veggies to any 4.

 

I am a beginner to JavaScript, please help me. I don't know how to group checboxes as fruits and veggies either 😭

 

This topic has been closed for replies.

1 reply

Known Participant
April 20, 2023

@Nesa Nurani If you can help me with this. 

 

Thanks for helping each time.

 

You're amazing!