I'm trying to create a captcha form element in a table row.

I have this for a text element.

// set <tr><td> wrapper around element
$email->setDecorators(array(
  'ViewHelper',
  'Description',
  'Errors',
  array(array('data'=>'HtmlTag'), array('tag' => 'td')),
  array('Label', array('tag' => 'td')),
  array(array('row'=>'HtmlTag'),array('tag'=>'tr'))
));

It creates this :

<tr>
<td><label for="email" class="required">E-Mail</label></td>
<td><input type="text" name="email" id="email" value=""
maxlength="125"></td>
</tr>

However, the same setDecorators statement on Zend_Form_Element_Captcha
doesn't work.

Anyone know the correct syntax to make something like this :

<tr>
<td><label for="captcha" class="required">Enter Code:</label></td>
<td><img
src="/images/captcha/1d97a252be45739b5f6c83583b02f4d8.png"/><br/><input
type="hidden" name="captcha[id]" value="1d97a252be45739b5f6c83583b02f4d8"
helper="formText" id="captcha-id"><input type="text" name="captcha[input]"
id="captcha-input" value="" helper="formText"></td>
</tr>

Thanks 
Terre
 


Reply via email to