Note that there are some explanatory texts on larger screens.

plurals
  1. POTreating specific check boxes as radio buttons?
    primarykey
    data
    text
    <p>I am aware of the fact that checkboxes and radio buttons are two different types of data entry, and that wanting to use the one to be able to do the other is a bit like dressing up a cat to pretend it's a dog - but the way I want these checkboxes to operate there is no other way (I will show you later on).</p> <p>I've created a data entry page where a member of staff can assign specific class qualifications to classes within the designated year group. The way these qualifications work is pretty straight forward: Multiple qualifications can be assigned to any class <strong>EXCEPT ONE</strong>: It is impossible for the same class to have both qualification EnAQA4700 and EnAQA4705. </p> <p>So a class can have up to four qualifications at the same time (checkboxes, easy) with the 4700 and the 4705 being an exception; can be 4700, can be 4705, can be neither but <strong>CANNOT</strong> be both (radio buttons!)</p> <p>Is it possible for the first two checkboxes (for EnAQA4700 and EnAQA4705) to be treated as radio buttons, but still able to be written into the database along with the other checkboxes?</p> <p>Many thanks!</p> <p><img src="https://i.stack.imgur.com/qLT7b.png" alt="enter image description here"></p> <p><strong>EDIT</strong></p> <p>Here is the HTML code for the first row of the table. You will see that the class name contains a PHP array variable and in one of my previous questions about checkboxes recognizing what class to write into using an array I was told to name the checkboxes accordingly.</p> <pre><code>&lt;tr&gt; &lt;td height="30"&gt;&lt;?php echo $cl[0] ?&gt;&lt;/td&gt; &lt;td height="30"&gt;&lt;input type="checkbox" name="Classes[&lt;?php echo $cl[0]; ?&gt;][]" id="checkbox"&gt;&lt;/td&gt; &lt;td height="30"&gt;&lt;input type="checkbox" name="Classes[&lt;?php echo $cl[0]; ?&gt;][]" id="checkbox2"&gt;&lt;/td&gt; &lt;td height="30"&gt;&lt;input type="checkbox" name="Classes[&lt;?php echo $cl[0]; ?&gt;][]" id="checkbox3"&gt;&lt;/td&gt; &lt;td height="30"&gt;&lt;input type="checkbox" name="Classes[&lt;?php echo $cl[0]; ?&gt;][]" id="checkbox4"&gt;&lt;/td&gt; &lt;td height="30"&gt;&lt;input type="checkbox" name="Classes[&lt;?php echo $cl[0]; ?&gt;][]" id="checkbox5"&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload