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 8619323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:18:44+00:00 2026-06-12T06:18:44+00:00

Is it possible, with Zend_Form, to have 4 columns? Example: <table> <tr> <td>Element 1

  • 0

Is it possible, with Zend_Form, to have 4 columns?
Example:

<table>
    <tr>
        <td>Element 1 label</td>
        <td>element1</td>
        <td>Element 2 label</td>
        <td>element2</td>
    </tr>
</table>

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-06-12T06:18:45+00:00Added an answer on June 12, 2026 at 6:18 am

    Yup!
    The viewScript Decorator is your friend.

    //the viewScript
    <article class="login">
        <form action="<?php echo $this->element->getAction() ?>"
              method="<?php echo $this->element->getMethod() ?>">
            <table>
                <tr>
                    <th>Login</th>
                <tr>
                    //renders just the Label decorator
                    <td><?php echo $this->element->name->renderLabel() ?></td>
                    //renders just the viewHelper decorator
                    <td><?php echo $this->element->name->renderViewHelper() ?></td>
                </tr>
                <tr>
                     //renders just the Label decorator
                    <td><?php echo $this->element->password->renderLabel() ?></td>
                     //renders just the viewHelper decorator
                    <td><?php echo $this->element->password->renderViewHelper() ?></td>
                </tr>
                <tr>
                     //renders the entire element
                    <td><?php echo $this->element->submit ?></td>
                </tr>
            </table>
        </form>
    </article>
    

    The Form

    <?php
    class Application_Form_Login extends Zend_Form
    {
    
        public function init() {
            $this->setMethod('POST');
            $this->setAction('/index/login');
    
            /**
             * Set the viewScript decorator
             */
            $this->setDecorators(array(
                array('ViewScript', array(
                        'viewScript' => '_login.phtml'
                ))
            ));
    
            /**
             * Text element 'name'
             */
            $name = new Zend_Form_Element_Text('name');
            $name->setLabel('Name');
            $name->setAttrib('placeholder', 'Username');
            $name->setOptions(array('size' => 20));
    
            /**
             * Password element for 'password'
             */
            $password = new Zend_Form_Element_Password('password');
            $password->setLabel('Password');
            $password->setAttrib('placeholder', 'Password');
            $password->setOptions(array('size' => 20));
    
            $submit = new Zend_Form_Element_Submit('submit');
            $submit->setLabel('Login');
    
            $this->addElements(array($name, $password, $submit));
        }
    }
    

    Hope this helps.

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

Sidebar

Related Questions

It is possible to make form and table (View) by both using zend_form with
I'm using Zend_Form for handling a form and I have a problem with localization.
Is it possible to disable the escaping that is performed on the Zend_Form setDescription
I have a custom markup for my zend_form and i try to set a
Is it possible to load a Zend_Form from a view helper? I'm using thise
Is it possible to use Zend Queue without to have Zend Server installed on
Is it possible to wrap the form element in a div AND the whole
I have this in a Zend_Form 's init method: $username_validators = array( 'Alpha', array('StringLength',
Isit possible to have a zend view which returns nothing? I have the following,
Is it possible to alter an html attribute of a Zend_Form_Element in a Decorator

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.