Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7673123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:26:21+00:00 2026-05-31T16:26:21+00:00

Hi I have created a setDecorator() which is something like this: $timeSu->setDecorators(array(‘ViewHelper’, ‘Description’, ‘Errors’,

  • 0

Hi I have created a setDecorator() which is something like this:

$timeSu->setDecorators(array('ViewHelper', 'Description', 'Errors',  
        array(
            array('data' => 'HtmlTag'),
            array('tag' => 'td', 'class' => 'input')),
        array('Label', 
            array('tag' => 'td')),  
        array(
            array('blah'=>'HtmlTag'),
            array('tag' => 'tr', 'openOnly' => true, 
                  'placement' => end_Form_Decorator_Abstract::PREPEND))

    ));

Similarly i have same decorator for more elements. Now this gives me something like

<form enctype="application/x-www-form-urlencoded" action="" method="post">
<div></div><div></div><div></div><div></div><div></div><table id="targetform"><tbody><tr><td id="timeSu-label"><label for="timeSu" class="required">Sunday:</label></td><td class="input"><select name="timeSu[]" id="timeSu" multiple="multiple" size="5" class="target_input"><option value="NULL" label="Select" selected="selected">Select</option><option value="00:00" label="00:00">00:00</option>.....</select></td><tr><td colspan="2" align="center"><input type="submit" name="submit" id="submit" value="Submit" class="target_button"></td></tr></tbody></table></form>

and it creates two rows i.e. first row with the select element with two columns. first column contain the label name and second contain the select box. Now i have seven such select items and using above decorator for same it creates one row with 14 different colums. But what i want to do is to create a row that will contain 7 columns for 7 select elements. each column will than contain two rows, one for the label and second for select box.

In short currently the output shows each element attibutes like label and select in columns, and i want them to be in rows so that they would be like vertically aligned one below other.
thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:26:23+00:00Added an answer on May 31, 2026 at 4:26 pm

    Attach such decorator for each of your elements:

    $this->addElement($this->createElement('select', 'fieldname1')
            ->setLabel('Label')
            ->setDecorators(array(
                'ViewHelper',
                array(array('filedtd' => 'HtmlTag'), array('tag' => 'td')),
                array(array('fieldtr' => 'HtmlTag'), array('tag' => 'tr')),
                'Label',
                array(array('labeltd' => 'HtmlTag'), array('tag' => 'td')),
                array(array('labertr' => 'HtmlTag'), array('tag' => 'tr')),
                array(array('table' => 'HtmlTag'),   array('tag' => 'table')),
                array(array('wholetd' => 'HtmlTag'), array('tag' => 'td')),
           )));
    

    And decorator for form:

    $this->setDecorators(array(
                'FormElements',
                'Form',
                array(array('wholerow' => 'HtmlTag'), array('tag' => 'tr')),
                array(array('table' => 'HtmlTag'),    array('tag' => 'table')),
            ));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a form like this: class Form_Login extends Zend_Form { public function
I have created a windows service which is set to start automatically. This service
I have created a bar to appear over the keyboard for next/previous/done like the
I have created an xPages application which uses a lot of server side javascript
I have created a module in Magento which takes certain views from customers about
Have created a ATL COM project through which I am inserting Menu Items to
I have created a PHP form, which, upon submission, goes to another PHP page.
i have created a running process which listens for input: listen = Popen([home/user/listen], stdout=PIPE,
I have created a Silverlight project which also contains a Web project. I have
I have created a service which displays a status bar notification after certain time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.