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

Related Questions

currently I have an Zend application on default location www.example.com/{controller}/{action} but when a user
Default JVM uses maximum 1.5 GB RAM/JVM Java application. But my Server have 8
I have a zend form that I'm initializing as follows: $form = new Form_XYZ();
I have a form made by Zend Framework that needs a submit button. I
Racking my brains I have been through the zend documentation and crawled google but
i have a multiselect box (of interests) in my zend form, and i am
I'm currently styling form elements with a custom CSS class to style text inputs
The default class name of the zend framework is zend_form and the elements of
I have a form which consists of selects/dropdowns. I have set their default values
I'm making my first zend application, but I have problems with the autoload of

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.