Scrollable box containing list of Checkboxes in HTML

后端 未结 5 1583
孤独总比滥情好
孤独总比滥情好 2020-12-12 20:31

Attached you\'ll see a picture of a mock up I did for the required UI. As you can see I need some type of scrollable box that contains checkboxes.

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-12 21:19

    if u have aray then use this function in PHP

            function addOCheckBoxValuesByArray($arr) {      
                    foreach ($arr as $key => $value) {
                    echo"$value
    "; } } below code access data after user press submit button if(isset($_POST['formBylist'])) { $selectedDataBylist = $_POST['formBylist']; if(!isset($selectedDataBylist)) { // is data not selected echo "You didn't select data from below checkbox Table"; } else { // data is user selected $Cnt = count($selectedDataBylist); for($i=0; $i < $Cnt; $i++) { $result =$selectedDataBylist[$i]); } } enter code here } to put all check boxes in scroll bar - use CSS ///
    addOCheckBoxValuesByArray($chekboxarray);?>
    enter code here

提交回复
热议问题