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

  • Home
  • SEARCH
  • 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 1018435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:51:24+00:00 2026-05-16T10:51:24+00:00

I have the Zend Form with some elements. And I need to placing some

  • 0

I have the Zend Form with some elements. And I need to placing some elements in first div, some in other div.
Part of my form:

private function _createForm($action) {

$form = new Zend_Form();

$form->setName($action . '_form');
$form->setMethod('post');       

$title = $form->createElement('text', 'title');
$title->setLabel('Title')
      ->setAttrib('maxlength',50)->setAttrib('id', 'title')->setAttrib('class', $action . '_title')
      ->setAttrib('style','height: 15px; width: 200px;')
      ->setRequired(true)
      ->setDecorators(array(
        'ViewHelper',
        array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class'  => 'element')),
        array('Label', array('tag' => 'td')),
        array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
      ));
$priority = $form->createElement('select', 'priority');
$priority->setLabel('Parent Rank')
        ->setAttrib('id', 'priority')->setAttrib('class', $action . '_priority')
        ->setMultiOptions($dataGrid->AllRanks())
        ->setDecorators(array(
          'ViewHelper',
          array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class'  => 'element')),
          array('Label', array('tag' => 'td')),
          array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
        ));
$enabled = $form->createElement('select', 'enabled');
$enabled->setLabel('Enabled')
        ->setAttrib('id', 'enabled')->setAttrib('class', $action . '_enabled')
        ->setMultiOptions(array('1'=>'yes', '0'=>'no'))
        ->setDecorators(array(
          'ViewHelper',
          array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class'  => 'element')),
          array('Label', array('tag' => 'td')),
          array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
        ));
$use_gv = $form->createElement('select', 'use_gv');
$use_gv->setLabel('Use GV in calc.?')
        ->setAttrib('id', 'use_gv')->setAttrib('class', $action . '_use_gv')
        ->setMultiOptions(array('1'=>'yes', '0'=>'no'))
        ->setDecorators(array(
          'ViewHelper',
          array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class'  => 'element')),
          array('Label', array('tag' => 'td')),
          array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
        ));   

}

And now, how to placing $title and $priority elements in one div, and others elements in the seconf?

  • 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-16T10:51:25+00:00Added an answer on May 16, 2026 at 10:51 am

    You need to use display groups (http://framework.zend.com/manual/en/zend.form.forms.html#zend.form.forms.displaygroups). Disable the default decorators for them and then add your own using the the setDecorator function

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are some of the ways you have implemented models in the Zend Framework?
I have a Zend Framework application structure as below: /application /library /Zend /Core /Filter
I have been using the Zend Framework with an MVC configuration, read about Ruby
The Zend Framework based site I have been working on is now being migrated
I have a colleague who is looking into opcode caching/Zend Acceleration (I've always assumed
I am using the Zend Framework. I have a controller named 'UserController' that has
Have you guys had any experiences (positive or negative) by placing your source code/solution
I have a function that receives an array of Strings. These are the names
I have a set of values and I need to get the lambda for
Have just started using Google Chrome , and noticed in parts of our site,

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.