Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I add checkbox in the drop down?
    primarykey
    data
    text
    <p>I am trying to add check box in the drop down, but I don't know how to achieve this. Below is the code which I used to define check-boxes:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Scrolling Checkboxes&lt;/title&gt; &lt;script type="text/javascript"&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="ScrollCB" style="height:150;width:200px;overflow:auto"&gt; &lt;input type="checkbox" id="scb1" name="scb1" value="1"&gt;0-1 Hours&lt;br&gt; &lt;input type="checkbox" id="scb2" name="scb2" value="2"&gt;1-2 Hours&lt;br&gt; &lt;input type="checkbox" id="scb3" name="scb3" value="3"&gt;2-3 Hours&lt;br&gt; &lt;input type="checkbox" id="scb4" name="scb4" value="4"&gt;3-4 Hours&lt;br&gt; &lt;input type="checkbox" id="scb5" name="scb5" value="5"&gt;4-5 Hours&lt;br&gt; &lt;input type="checkbox" id="scb6" name="scb6" value="6"&gt;5-6 Hours&lt;br&gt; &lt;input type="checkbox" id="scb7" name="scb7" value="7"&gt;6-7 Hours&lt;br&gt; &lt;input type="checkbox" id="scb8" name="scb8" value="8"&gt;7-8 Hours&lt;br&gt; &lt;input type="checkbox" id="scb9" name="scb9" value="9"&gt;8-9 Hours&lt;br&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>below is my code to define drop-down-:</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;?php function select_time($time_) { ?&gt; &lt;select id="ftime" name="selecteddate_t&lt;?php echo $time_ ;?&gt;"&gt; &lt;?php for($t=0;$t&lt;=23;$t++) { ?&gt; &lt;option value=" &lt;?php echo $t; ?&gt;"&gt;&lt;?php echo $t; ?&gt;&lt;/option&gt; &lt;?php } ?&gt; &lt;/select&gt; &lt;?php } ?&gt; &lt;form action="xyz.php" method="post"&gt; &lt;?php echo "Time: "select_time('from');?&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I want that when any one click on drop-down, a list of check-boxes will get display and he/she may be able to select more than one check box. Also, please explain how can I get all the selected value in variable. We are trying to provide user with an option to select multiple time slots and as per with selection we will show him/her the required stats. I have no idea about what I need is quiet feasible or not. I had tried a lot to integrate check boxes with drop-down, but I did not reached to desired result.</p>
    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.
 

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