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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:45:46+00:00 2026-05-16T02:45:46+00:00

There is an example of getting data from form using mapper in official quickstart

  • 0

There is an example of getting data from form using mapper in official quickstart. But there is no example in the whole Internet of populating form with data from mapper (for usual edit action, for example).

I usually do something like this (without using mapper and dbTable):

class News_Model_Form_News extends Zend_Form {

private $id = 0;

public function getId(){
    return $this->id;
}

public function setId($id){
    $this->id = $id;
}

public function init() {

    $model = new News_Model_Backend();

    //if form is needed for adding action
    if (!$this->id) {
        //form code
    } else {
    //if form is needed for edit action (fill with values)
        //form code with values
    }
}}

But with mapper pattern this stuff should became more elegent and cool, but I don’t know how to do this.

So the question is how to populate form with values using mapper pattern (for edit guestbook entry from quickstart, for example)?

  • 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-16T02:45:47+00:00Added an answer on May 16, 2026 at 2:45 am
    public function init() {
    
        $model = new News_Model_Backend();
        $this->populate($model->toArray());
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a best practice in getting data from multiple database tables using Zend?
I've recently got into getting data from servers . For example, from a CoD
is there any example on using java method to call rhino-javascript function and return
Is there any example for a Real Time Chart using the DexExpress in ASP.Net?
There is an example for doing this with Play! v2.0 but I'm trying to
There is an example on Adobe livedocs for using states : <!-- Define one
The situation occurs when getting some data from the database to compose a report
I’m having a problem getting the data from my database which I created to
hey there, so in a msSQL database that i'm saving and retrieving from using
I am getting some data from the table in WinForms (MySQL Connector) and would

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.