makki
makki

Reputation: 2107

Help required regarding Zend_Form

I wanted following output from Zend_Form please help

<form ...>
<div class="labels"><b>Name:</b></div>
<input type="text" value="" name="name" class="whitelabelform"><br>
<div class="labels"><b>Email:</b></div>
<input type="text" value="" name="email" class="whitelabelform"><br>
<div class="labels"><b>Security code:</b></div>
<div id="recaptcha_cs_fix">
<script type="text/javascript" src="http://src"></script></div>
<div id="submitbtn"><input type="image" alt="Submit Button" src="submit_button.png"> 
<input type="hidden" value="true" name="submitted"></div>
</form>

Upvotes: 0

Views: 134

Answers (3)

Aldee
Aldee

Reputation: 4518

You can have a form class which your elements are created there and call it in the php (zend view / .phtml file) using something like:

<?php echo $this->form->myformelement; ?>

provided that your controller also assigns the form created to the variable named "form".

Upvotes: 0

takeshin
takeshin

Reputation: 50638

Watch this presentation, and you will manage to get any markup of Zend Form you need:

Leveraging Zend_Form Decorators

Upvotes: 1

Iznogood
Iznogood

Reputation: 12843

I won`t code it for you but I can point you to a tutorial about Zend_Form. Its very easy to create what you seek take a look at it.

After you have tried if it doesnt work ask again, posting your code and we will help you fix it.

Upvotes: 0

Related Questions