Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Form Helper problem
#2

[eluser]Jan_1[/eluser]
your checkboxes a little bit messy... but how about this as a hint:

Code:
<table id='waiting' class='display'>
<thead>
  <tr>
     <th>ID</th>                      
     ... etc
     </tr>
  </thead>
<tbody>
&lt;?php
$i=0;
echo form_open('studentqueue_controller/counselorscreen');
foreach ($waiting as $row)
{
?&gt;                
     <tr>
     <td>&lt;?php echo htmlspecialchars($row['id'], ENT_QUOTES, 'UTF-8'); ?&gt;</td>    
     ... etc
     <td>&lt;?php echo htmlspecialchars($row['counselorcomments'], ENT_QUOTES, 'UTF-8'); ?&gt;</td>
     <td>&lt;?php echo form_dropdown('namedrop', $names) ?&gt;</td>
      <td>&lt;input type="checkbox" name="start[&lt;?=$i?&gt;]" value="$row['id']"&gt;Start</td>
      <td>&lt;input type="checkbox" name="delete[&lt;?=$i?&gt;]" value="$row['id']"&gt;Delete</td>
     </tr>
&lt;?php
}
echo form_submit('submit', 'Start Action'); ?&gt;
echo form_close();
?&gt;
</tbody>    
</table>

and in studentqueue_controller
Code:
function counselorscreen()
if ($this->form_validation->run() == FALSE)
  {
   load formular view (again)
  }
  else
  {
                     $starter = $this->input->post('start');
                     foreach($starter as $start){  do something  }
  }

or maybe use
Code:
<td>&lt;?=anchor("controller/function/".$row['id'], "<i class='icon-remove'></i>")?&gt;</td>
(with nice icons from twitter/bootstrap)
if you want to have different things in the row

Hope it's a help. have a nice weekend!


Messages In This Thread
CodeIgniter Form Helper problem - by El Forum - 02-23-2013, 07:39 AM
CodeIgniter Form Helper problem - by El Forum - 02-23-2013, 09:34 AM
CodeIgniter Form Helper problem - by El Forum - 02-23-2013, 09:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB