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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:16:36+00:00 2026-06-01T21:16:36+00:00

I used this tutorial (especially Lesson 6 and 7) to create my own backend

  • 0

I used this tutorial (especially Lesson 6 and 7) to create my own backend grid for Magento: http://www.pierrefay.com/magento-developper-guide-howto-tutorial-5

Everything works fine. I can create new data entries for my grid. If I click on an entry the VarienForm is displayed again but all the text fields are empty. This seems as if Magento thinks I want to edit all the text fields. But actually I want it to display the entry data first. But it only shows empty fields.

Can anyone help me out here? Thanks a lot!

  • 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-01T21:16:38+00:00Added an answer on June 1, 2026 at 9:16 pm

    There are a lot of things that could be wrong with your implementation, but it’s impossible to say without seeing your code. Nevertheless, I’m going to try. That tutorial looks fine to me, but I haven’t run the code so I can’t be sure. I’m inclined to think you might have just missed something. Working in grids & tabs can be particularly delicate at the best of times.

    It does sound to me like it’s one of two things. It sounds like either

    A) Your model data is not being stored in the registry. That means the problem is in this part of the code:

    <?php
    class Pfay_Test_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
    {
        ...
        public function editAction()
        {
            $testId = $this->getRequest()->getParam('id');
            $testModel = Mage::getModel('test/test')->load($testId);
            if ($testModel->getId() || $testId == 0)
            {
                Mage::register('test_data', $testModel);
            }
    

    What this section of code does is ‘registers’ the selected model in Magento’s registry. Later in the code, you’ll see that it calls:

    $form->setValues(Mage::registry('test_data')->getData());
    

    to populate your form fields.

    Try putting commands like these in the code above:

    var_dump($testId);
    die();
    

    or

    print_r($testModel);
    die();
    

    and running it again. Is $testId being set? Is $testModel being loaded? Is the if statement for the registry loading? If not, trace the problem back.

    or it might also be

    B) Your form is not prepopulating data because the column names are wrong.

    Look where the code says:

    <?php
    class Pfay_Test_Block_Adminhtml_Test_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
    {
       protected function _prepareForm()
       {
           $form = new Varien_Data_Form();
           $this->setForm($form);
           $fieldset = $form->addFieldset('test_form', array('legend'=>'ref information'));
           $fieldset->addField('nom', 'text',
               array(
                   'label' => 'Nom',
                   'class' => 'required-entry',
                   'required' => true,
                   'name' => 'nom',
               )
           );
    

    You need to ensure that “nom” is in fact one of your model’s attribute names. Did you change the attribute names when you created your test model and forgot to change it here? Change these values accordingly.

    I hope that this helps you to solve your problem. Good luck!

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

Sidebar

Related Questions

I've used this tutorial - http://www.netzgesta.de/mapper/ to create an interactive map ( http://teamworksdesign.com/clients/neurosign/contact/alabama/ ),
I used this tutorial http://delphi.about.com/od/kbthread/a/thread-gui.htm to create a class that asynchronously downloads a file
I've used the exact files from this tutorial: http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/ The ideea is to submit
I originally used this tutorial - http://icodeblog.com/2009/07/09/integrating-twitter-into-your-applications/ to put twitter into my app. It
Hi I have used this tutorial http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/ to create php - jquery - ajax
I've used this tutorial in order to create and populate my own SQLite database
I used this tutorial http://mobiforge.com/developing/story/using-google-maps-android to display Map view and set onTouch event to
I used this tutorial: http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html To build my first form/create user app, but it
I have used this tutorial before for adding registration fields to the Magento registration
I've used this tutorial to create an app with a table view that is

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.