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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:37:17+00:00 2026-06-04T02:37:17+00:00

I am trying to set display:none attribute to Zend_Element_Checkbox. I have managed to hide

  • 0

I am trying to set display:none attribute to Zend_Element_Checkbox. I have managed to hide checkbox itself. Unfortunately label keeps on displaying still.

Here is my code:

$this->addElement('Select', 'junior_accounts', array(
    'label' => 'Junior (15yrs & under)',
    'multiOptions' => $personNumberList,
    'tabindex' => $tabIndex++,
  ));

$this->getElement('junior_accounts')->setAttribs(array('style' => 'display: none'));

Is there any programmatical method of doing this or I need to set class of the element and add appropriate CSS definition?

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-04T02:37:19+00:00Added an answer on June 4, 2026 at 2:37 am

    You can get access to the label of the Zend_Form_Element via Zend_Form_Element::getDecorator(). Then you can set the style option of the decorator to control its CSS properties.

    $label = $this->getElement('junior_accounts')->getDecorator('Label');
    
    if ($label instanceof Zend_Form_Decorator_Abstract) {
        $label->setOption('style', 'display: none');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an empty div set to display:none called id=c1. I am trying
I am trying to find the control and display set to block or none
I'm trying to use the show and hide to display a different set of
I'm trying to display set of data which have retrieved from the sql database
I'm trying to set the attribute of an element programmatically, but firebug keeps giving
I have an iFrame on a page set to display: none; <div id=the-stage style=display:none;>
I'm trying to display set of data using jq grid. For that I used
I'm trying to set up a messages view with asp.net mvc that will display
I'm trying to display a map in a set of tabs, using fragments. The
I'm trying to use jQuery to show an image that I have set to

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.