Here is the HTML generated:
<dt id="link-label"><label for="link" class="optional">Link:</label></dt>
<dd id="link-element">
<select name="link" id="link">
<option value="" label=""></option>
<option value="Url" label="Url">Url</option>
<option value="PDF" label="PDF">PDF</option>
</select></dd>
<dt id="url-label"><label for="url" class="optional">Url:</label></dt>
<dd style="display: block;" id="url-element">
<input name="url" id="url" value="" type="text"></dd>
<dt id="pdf-label"><label for="pdf" class="optional">PDF:</label></dt>
<dd style="display: none;">
<input name="MAX_FILE_SIZE" value="133169152" id="MAX_FILE_SIZE" type="hidden">
<input name="pdf" id="pdf" type="file"></dd>
and here is the zend_form:
$elements['link'] = $this->createElement( 'select', 'link' )
->setLabel('Link:')
->setMultiOptions(array('' => '', 'Url'=>'Url', 'PDF'=>'PDF'));
$elements['url'] = $this->createElement( 'text', 'url' )->setLabel('Url:');
$elements['pdf'] = $this->createElement( 'file', 'pdf' )->setLabel('PDF:');
$elements['date'] = $this->createElement( 'text', 'date' )->setLabel('Date:');
we'd need to see the HTML code the script applies to...
I hide the elements named "pdf" and "url". I just need to also hide their labels. I tried hiding by the label name "pdf-label" and "url-label" but this just hid the whole form.