Jump to content


Photo

How to get form elements in a row in ZF 1.12

zend framework 1.12

  • Please log in to reply
3 replies to this topic

#1 yoursurrogategod

yoursurrogategod

    Advanced Member

  • Members
  • PipPipPip
  • 179 posts

Posted 23 January 2013 - 01:17 PM

Hi all,

This is the HTML that was generated by my form elements:
http://bin.cakephp.org/view/1808069180

The relevant information is located from line 3202 to 3347. Basically, say I have a drop-down. I'd like it to be one next to each other (or better yet, have table tags be generated).

<form enctype="application/x-www-form-urlencoded" action="" method="post"><dl class="zend_form">
<dt id="passFail00-label"> </dt>
<dd id="passFail00-element">
<select name="passFail00" id="passFail00">
<option value="P" label="Pass" selected="selected">Pass</option>
<option value="F" label="Fail">Fail</option>
</select></dd>
...
</form>

This is how my view looks like (the relevant line is 381):
http://bin.cakephp.org/view/1241400830
This is my controller:
http://bin.cakephp.org/view/106144493
This is my form class (the relevant method is buildBottomForm):
http://bin.cakephp.org/view/585393545
http://bin.cakephp.org/view/585393545
How can I get this to display horizontally and not in one column?

#2 yoursurrogategod

yoursurrogategod

    Advanced Member

  • Members
  • PipPipPip
  • 179 posts

Posted 23 January 2013 - 05:07 PM

Actually, if there is a way for me to select which elements get rendered and when, I could do away with this problem and just specify what to render and when. Any way I can do that in zend?

#3 mwalkowiak

mwalkowiak

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 23 January 2013 - 09:51 PM

Please read about decorators: http://framework.zen...Decorators.html

#4 yoursurrogategod

yoursurrogategod

    Advanced Member

  • Members
  • PipPipPip
  • 179 posts

Posted 24 January 2013 - 02:45 PM

Please read about decorators: http://framework.zen...Decorators.html

Thanks, I'm reading a tutorial on that right now. But would you happen to know of an example where decorators are used to specify what gets rendered and how?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com