que tal GatorV
pues en mi form tengo:
Código PHP:
class Application_modules_default_Forms_Form1 extends Zend_Form
{
public $role_local;
function __construct($role) {
$this->role_local=$role;
parent::__construct();
}
public function init()
{
$datos = new DatosBase();
$rfc_list = $datos->getRazonsocialList();
echo '<select id="example" name="example" multiple="multiple">';
foreach ($rfc_list as $rfc)
{
echo '<optgroup label="'.$rfc['nombre'].'">';
$empresas_list = $datos->getEmpresasList((int)$rfc['id'],(int)$this->role_local);
foreach ($empresas_list as $empresa)
{
echo '<option value="'.$empresa['id_uname'].'">'.$empresa['nombre'].'</option>';
}
echo '</optgroup>';
}
echo '</select>';
$submit = $this->createElement('submit','generar');
$submit->setLabel('Generar consulta');
$this->addElement($submit);
pero me genera un codigo html
Código PHP:
<div id="content">
<form method="post" action="" enctype="application/x-www-form-urlencoded">
.
.
.
<input type="submit" value="Generar consulta" id="generar" name="generar">
.
.
.
</form>
<select multiple="multiple" name="example" id="example" style="display: none;">
.
.
.
</select>