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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:34:14+00:00 2026-05-13T07:34:14+00:00

By default Zend Form Text elements don’t have a width specified. Textarea elements have

  • 0

By default Zend Form Text elements don’t have a width specified. Textarea elements have a default of rows="24" and cols="80". But when I set a different value…

$body = new Zend_Form_Element_Textarea('body');
$body->setLabel('Body:')
    ->setRequired(true)
    ->setAttrib('COLS', '40')
    ->setAttrib('ROWS', '4');
$this->addElement($body);

…the attributes are only added, not changed:

<textarea name="body" id="body" COLS="40" ROWS="4" rows="24" cols="80">

What is the correct way to specify a width and height of a textarea element, and the column width of a text element?

Solution:

Apparently, you can’t specify html attributes in capital letters or else it will add duplicate attributes.

To change the height and width of a text area element:

$textarea = new Zend_Form_Element_Textarea('body');
$textarea
    ->setAttrib('cols', '40')
    ->setAttrib('rows', '4');

To change the width of a text element:

$text = new Zend_Form_Element_Text('subject');
$text->setAttrib('size', '40');
  • 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-13T07:34:15+00:00Added an answer on May 13, 2026 at 7:34 am

    It’ll work if you take those attribute names and lowercase’em.

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

Sidebar

Ask A Question

Stats

  • Questions 533k
  • Answers 533k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer CSS code is not copyrightable by itself insofar as the… May 17, 2026 at 12:28 am
  • Editorial Team
    Editorial Team added an answer Use colorWithPatternImage with UIColor. Edit: Sorry should have read the… May 17, 2026 at 12:28 am
  • Editorial Team
    Editorial Team added an answer I don't see any code that actually initializes your selenium… May 17, 2026 at 12:28 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm currently styling form elements with a custom CSS class to style text inputs
I have form, where some fields are looks like rows, so I can add/delete
I'm validating a text field in my form as follows: $name = new Zend_Form_Element_Text('name');
I have a registration form with a few fields. One of them looks like
I'm using Zend, a PHP library, to work with Amazon EC2. I have created
I am having issues with zend_form and zend_decorator . I have created a decorator
I am having trouble over ridding the default set of decorators with Zend_Form. I
I am using Zend Framework 1.9.6. I think I've got it pretty much figured
I managed to get my Zend modular project working with Doctrine 1.2 according to
I am using the Zend Framework, and I use the .htaccess for some settings.

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.