Jump to content

Dynamic amount of selectable checkbox items


biggieuk

Recommended Posts

Hi all,

 

I have a dynamic booking form, with two repeating tables to display a series of sessions and an extra category containing checkboxes. Table1 contains information about morning sessions ($query_sessionAM = "SELECT * FROM sessions WHERE ampm = 'am'";), Table2 contains all afternoon sessions ($query_sessionPM = "SELECT * FROM sessions WHERE ampm = 'pm'";).

 

I have dynamically assigned each checkbox a name using  "check" + 'sessionid' (e.g.  Check12).

 

My problem is that users should be able to select 1 or 2 choices from the morning sessions and 1 or 2 from the afternoon sessions. How can i make it so that a maximum of 2 sessions per table can be selected?

 

This number may also be changed in future so a dynamic session choice would be an advantage.

 

If anybody can give me guidance towards this then it would be much appreciated!

 

thanks

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.