ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

server side check box validation

July 25, 2007 5:08am

Subscribe [2]
  • #1 / Jul 25, 2007 5:08am

    praveens

    73 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%2 == 0)  {?>
    <?php } }?>

    please hep me thx

  • #2 / Jul 25, 2007 7:06am

    HushPe

    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”;

  • #3 / Jul 25, 2007 11:30am

    praveens

    73 posts

    thanks a lot 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases