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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:07:51+00:00 2026-05-17T00:07:51+00:00

I have tried all the combinations I can think off but this form: class

  • 0

I have tried all the combinations I can think off but this form:

class Form_Login Extends Zend_Form{

    public function init(){
        $this->setMethod('post');


        $email = new Zend_Form_Element_Text('email');
        $emailValidator = new Zend_Validate_EmailAddress();
        $emailValidator->setMessage('Please use a valid email address');
        $email->addValidator($emailValidator)
                ->setRequired(TRUE)
                ->setLabel("Email Address")
                ->setAttrib('size', '35');

        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Password')
                ->setAttrib('size', '35')
                ->setRequired(true);

        $submit = new Zend_Form_Element_Submit('login');
        $submit->setLabel('Login');


        $this->addElements(array(
            $email,
            $password
            )
        );



        $this->addDisplayGroup(array(
                    'email',
                    'password'

        ),'loginGroup',array('legend' => 'Login'));


        $loginGroup = $this->getDisplayGroup('loginGroup');


        $this->setElementDecorators(array(
            'ViewHelper',
            array('Label', array('separator' => '', 'requiredPrefix' => '* ')),
            array('Errors'),
            array('HtmlTag', array('tag' => 'p', 'class' => 'form-element')),
        ));


        $loginGroup->setDecorators(
            array(
                'FormElements',
                 array('HtmlTag',array('tag'=>'div','openOnly'=>true)),
                 'Fieldset'
                )
        );


        $this->addElements(array($submit));

        //buttons do not need labels
        $submit->setDecorators(array(
            array('ViewHelper'),
            array('HtmlTag', array('tag' => 'p', 'class' => 'submit-button'))
        ));

    }
}

Displays fine in google chrome like the image below:

<fieldset id="fieldset-loginGroup"><legend>Login</legend>
<div>
<p class="form-element"><label for="email" class="required">* Email Address</label>
<input type="text" name="email" id="email" value="" size="35"></p>
<p class="form-element"><label for="password" class="required">* Password</label>
<input type="password" name="password" id="password" value="" size="35"></p>
<p class="submit-button">
<input type="submit" name="login" id="login" value="Login"></p></div>
</fieldset>

And in firefox it falls out of the fieldset tags so it looks like this:

<dl class="zend_form">
<fieldset id="fieldset-loginGroup"><legend>Login</legend>
<div>
<p class="form-element"><label for="email" class="required">* Email Address</label>
<input name="email" id="email" value="" size="35" type="text"></p>
<p class="form-element"><label for="password" class="required">* Password</label>
<input name="password" id="password" value="" size="35" type="password"></p></div>
</fieldset>
<p class="submit-button">
<input name="login" id="login" value="Login" type="submit"></p></dl>

I know the browser should not make much of a difference as the tags are generated server-side. I cannot however get the submit button to fall within the field set in firefox. I have not tried any other browser besides these two so I am not sure how it would look on them. Any help…?

  • 1 1 Answer
  • 3 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-17T00:07:52+00:00Added an answer on May 17, 2026 at 12:07 am

    getting round this I tried:

    class Form_Login Extends Zend_Form{
    
    public function init(){
        $this->setMethod('post');
    
        $email = new Zend_Form_Element_Text('email');
        $emailValidator = new Zend_Validate_EmailAddress();
        $emailValidator->setMessage('Please use a valid email address');
        $email->addValidator($emailValidator)
                ->setRequired(TRUE)
                ->setLabel("Email Address")
                ->setAttrib('size', '35');
    
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Password')
                ->setAttrib('size', '35')
                ->setRequired(true);
    
        $submit = new Zend_Form_Element_Submit('login');
        $submit->setLabel('Login');
    
    
        $this->addElements(array(
            $email,
            $password,
            $submit
            )
        );
    
    
        $this->setLegend('Login');
        $this->setElementDecorators(array(
            'ViewHelper',
            array('Label', array('separator' => '', 'requiredPrefix' => '* ')),
            array('Errors'),
            array('HtmlTag', array('tag' => 'p', 'class' => 'form-element')),
        ));
    
        $this->setDecorators(array(
            'FormElements',
            'Fieldset', 
            'Form'
            ));
    
        //buttons do not need labels
        $submit->setDecorators(array(
            array('ViewHelper'),
            array('HtmlTag', array('tag' => 'p', 'class' => 'submit-button'))
        ));
    
    }
    

    }

    And now it displays fine. The difference is :

    $this->setDecorators(array(
            'FormElements',
            'Fieldset', 
            'Form'
            ));
    

    and also setting the legend with:

    $this->setLegend('Login');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried all the combinations of finds I can think of, and haven't
I have tried all the solutions that have been provided including using PRAGMA but
I have tried almost all the solutions from SO but no success :(. I
I have tried many permutations but they all don't seems to work well. Am
i have tried looking online but had no luck, How i could delete all
How can I replace all line-endings in big file (>100MB)? I have tried to
Questions exactly like this have been asked before, i've read them all and tried
This should be pretty simple, but I can't seem to get it. I have
I have tried all the combinations in my little OOP brain of trying to
I have tried all of these various ways to set the value of the

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.