when the form first displays no chekboxes are checked obviously...the submit button does not display
now: as soon as i check any of the checkboxes the submit botton must display and when clicked it goes to another form where i do some things.
my code:
Code: Select all
<form action="<?php echo url_for('doc/document'); ?>" method="post">
<input type='hidden' name='service_id' value='<?php echo $service->getId() ?>'>
<table width='1000px' border='0' cellspacing='0'>
<tr>
<td class='td_header_2' align='left' colspan='2' width='50%'>
Available products for service: <?php echo $service->getName()?>
</td>
</tr>
<tr>
<table width='600px' class='tbl_content_box' border='0' cellspacing='0'>
<tr>
<td width='100px'>Products:</td>
<td width='100px'>Graphic</td>
<td width='100px'>Text</td>
</tr>
</table>
<table>
<table width='600px' class='tbl_content_box' border='0' cellspacing='0'><?php
$product_names = LpmPagePeer::getByAllProdNames($service->getId()); [color=#0040BF]//i need this to get the products for the particular service
foreach($product_names as $product_row) [/color]
{
?>
<tr>
<td > </td><td width='200px'><?php echo $product_row->getName(); ?></td>
<td width='200px'><input type="checkbox" name="graphic[]" value="<?php echo $product_row->getId();?>" /></td> [color=#0040FF]//and need this here to get the products selected id's(stored in graphic[]) to use in next form when submit button gets clicked..[/color]
<td width='200px'><input type="checkbox" name="text[]" value="<?php echo $product_row->getId();?>" /></td> [color=#0040FF]//same for here[/color]
</tr>
<?php }
?>
</table>
<table>
<tr>
<td>
<?php
[color=#FF4000] //loop thgough the graphic[] and text[] arrays
//and if any gets checked, display the submit button
//have nop clue how to do this[/color]
?>
</td>
</tr>
</table>
</form>
pleas help me?
thanks