开发者

Creating html elements in zend forms

I will like to translate this full code into a zend form with all the ids, html image elements, the classes, the spans. Everything. Am finding it difficult to add the image and to group the elements accordint to the divs and spans. I will be grateful if anyone could help me. Thank you.

<form method="get" action="/search" name="searchForm" id="searchForm">
<div class="logo">
    <a href="http://trial.com" title="Trial" name="trialLogo">
    <img width="205" height="40" alt="Trial Search" src="..image/logo.png">
    </a>
</div>
<input type="hidden" value="/Listing" name="ref_uri">
<div class="inputBlock">
    <span class="inputWrapper"><input type="text" class="labelMagic fieldHelpText" tabindex="3" id="what" n开发者_开发技巧ame="what" autocomplete="off"><input type="hidden" name="listingId"></span>
</div>
<div class="inputBlock">
    <span class="inputWrapper"><input type="text" autocomplete="off" value="Location" class="labelMagic" tabindex="4" id="where" name="where"><input type="hidden" name="geoId"></span>
</div>
<div class="submitWrapper"><button class="goButton" tabindex="5" name="go" type="submit">Go!</button>
</div>
</form>


You could certainly employ a collection of configured HtmlTag decorators to perform all this wrapping, including setting the attributes on all these divs and spans.

But perhaps easier would be to simply employ a ViewScript decorator for the form. A good example appears on this MWOP Dev Zone article.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜