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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:15:08+00:00 2026-05-27T10:15:08+00:00

I am new to Zend framework and have just started working on it. I

  • 0

I am new to Zend framework and have just started working on it. I am going to create a simple webpage accepting the username and password and then after authentication go to another webpage.

This is my reqirement in layman’s terms. For that, according to my understanding, the following structure should be used for Zend Framework:

  1. LoginController:contains loginAction()
  2. Application_Login_Form:that contains the textfield for username and password.
  3. login.phtml

Now execution starts from loginAction(). In loginAction() I call the Application_Login_Form and authenticate the given credentials then call login.phtml using $view->render('login.phtml');.

My First question is; Is that the right flow in Zend Framework or there should be some difference?

My Second question is; When I use Application_Login_Form extends Zend_Form I want to use <div id='ex'> because i want to use a css file and in which I have defined the style for div id ‘ex’. Can I use that div in Application_Login_Form? And If yes, then How? And if no then What should be done?

  • 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-27T10:15:09+00:00Added an answer on May 27, 2026 at 10:15 am

    I might be able to help with the second question.

    I use view scripts to get the format I want for all of my form models.

    So in application/models/FormLogin.php I would set up the Zend_Form elements I want then define the view script like this:

    $this->setDecorators( array( array('ViewScript', array('viewScript' => '_form_login.phtml'))));
    

    then in application/views/scripts/_form_login.phtml I define the view:

    <form id="login" action="<?= $this->element->getAction();?>" method="<?= $this->element->getMethod();?>">
    <fieldset>
        <label>Username</label>
        <?= $this->element->username; ?>
        <label>Password</label>
        <?= $this->element->password; ?>
    </fieldset>
    </form>
    

    If you use your own label tags like this make sure you remove them from the form element in FormLogin.php:

    $username->removeDecorator('label');
    

    I also get rid of the default htmltags:

    $username->removeDecorator('htmlTag');
    

    If you want a good how-to book for learning Zend I would recommend Easy PHP Websites with the Zend Framework by W Jason Gilmore. It really helped me. I did have a tough part in the first few chapters getting the framework set up and working properly, but after that it was easy to catch on. Good luck.

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

Sidebar

Related Questions

I am pretty new to the zend framework and the JQuery helper. I have
I've just installed Zend Framework and am running through a tutorial, but have hit
I'm new to OOP and frameworks, I've just gotten started with Zend and learned
i am getting started with zend framework.I have encountered this problem with forms. when
I'm using the zend framework and have started setting up really easy urls. I'm
I am very new to Zend Framework. And i have tried to get the
I am just getting into OOP and framework design. I have started by using
I'm new to Zend Framework. I would like to know how to implement zend
I am new to Zend framework. I am having a controller interact with a
I'm new to php and zend framework and fill very uncertain about following: For

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.