EllisLab text mark
Advanced Search
     
server side check box validation
Posted: 25 July 2007 05:08 AM   [ Ignore ]
Avatar
Joined: 2007-07-03
91 posts

hi how can validate multiple check box in server side


dynamically retrieve the check box elements in view pages

here is the view code

<?php
$ji 
= -1;
$count 0;
foreach(
$categorynames->result() as $row)
{ $count++;$ji++; ?>
       


<input type="checkbox" name="approve[]" id="approve<?=$ji;?>" 
value="<?php echo $row->consult_cat_id; ?>" >

</
strong><?php echo $row->consult_cat_name?></span></td>
                
         
<?php if($count%== 0)  {?>
<?php } }?> 

please hep me thx

 Signature 

Praveen Gowda

http://in.linkedin.com/in/praveenkumarkc

 
Posted: 25 July 2007 07:06 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2006-10-09
3 posts

Always fun, you might not easily be able to set the checked=“checked” if they missed something else, but validation should be easy enough as you’re looking to see if you value has been set.

$rules[‘approve’] = “required”;

 Signature 

http://www.totali.co.nz - Real IT
http://www.oscar.school.nz - Internet Filtering

 
Posted: 25 July 2007 11:30 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2007-07-03
91 posts

thanks a lot grin

 Signature 

Praveen Gowda

http://in.linkedin.com/in/praveenkumarkc