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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:21:43+00:00 2026-05-27T08:21:43+00:00

I started writing my first Zend Framework 2.0 (beta 1) PHP application using php

  • 0

I started writing my first Zend Framework 2.0 (beta 1) PHP application using php 5.3.

I actually created a skeleton project and module based on the following url: http://packages.zendframework.com/docs/latest/manual/en/zend.mvc.quick-start.html

I want to add forms to the module I created. the my question is how do I configure the module to know where to fetch the forms in?

my module name is called LoginModule and I created a new form called LoginForm (that extends Zend_Form) and I placed it in my_proj/module/LoginModule/src/LoginModule/forms

how do I configure that module to know where to fetch the form class from ?

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-05-27T08:21:44+00:00Added an answer on May 27, 2026 at 8:21 am

    found the answer at http://akrabat.com/getting-started-with-zend-framework-2/

    Everything has changed… (got better) in zend framework 2.

    I created a directory called ‘Form’ in the src directory of my module.
    inside I create the class that extends Form (not Zend_Form)
    example from the tutorial above:

    <?php
    namespace Album\Form;
    use Zend\Form\Form,
    Zend\Form\Element;
    class AlbumForm extends Form 
    {
    public function init()
    {
        $this->setName('album');
        $id = new Element\Hidden('id');
        $id->addFilter('Int');
    $artist = new Element\Text('artist');
    $artist->setLabel('Artist')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        $title = new Element\Text('title');
        $title->setLabel('Title')
              ->setRequired(true)
              ->addFilter('StripTags')
              ->addFilter('StringTrim')
              ->addValidator('NotEmpty');
        $submit = new Element\Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        $this->addElements(array($id, $artist, $title, $submit));
     }
    }
    

    i really recommend reading the tutorial for all zend framework 2 beginner 🙂

    thanks!

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

Sidebar

Related Questions

I've started working with my first makefile. I'm writing a roguelike in C++ using
I have just started writing a multilingual application for the very first time. I
I have just started writing my own JavaScript Framework (just for the learning experience),
I've started writing a few applications in PHP, and I'm becoming more familiar with
When I first started writing CSS, I was writing it in an expanded form
I have started writing my own WebDAV server class in .NET, and the first
I am about to start writing my first big CodeIgniter application, but before I
I've started writing a new CUDA application. However I hit a funny detour along
I started writing my first Android app, and chose SDK 2.0.1, before I had
Getting started on writing my first build script. I dont get the whole dependency

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.