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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:08:03+00:00 2026-05-23T08:08:03+00:00

In my controller I got a function which looks like this: public function newExperienceAction()

  • 0

In my controller I got a function which looks like this:

public function newExperienceAction() {
        $this->_helper->layout->disableLayout();
        $ajaxContext = $this->_helper->getHelper('AjaxContext');
        $ajaxContext->addActionContext('newExperience', 'html')->initContext();

        $id = $this->_getParam('id', null);

        $this->form = new Application_Form_Cv();
        $this->experience = new Zend_Form_SubForm();
        $this->form->addSubForm($this->experience, 'experience');
        $rowExperience = new Application_Form_Experience();
        $rowExperience->setDisplayGroups('experience');
        $this->experience->addSubForm($rowExperience, "experience$id", $id+3);

        echo $rowExperience->__toString();
    }

When the user press (+) on the form, a new subForm will be displayed.

I’m currently in the process if shaping it into a table. I will have more than one subForm on this form so I need to use DisplayGroups.

In this situation, I believe I have to create a Display group when the form is first created.

Then I need to append the new subForms to the existing display groups.

So the question:

How do I add new subForms to an existing display group?

  • 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-23T08:08:04+00:00Added an answer on May 23, 2026 at 8:08 am

    You can achieve this by simply adding

    $rowExperience->setIsArray(true);
    

    This causes the sub-form to act like a display group, i.e. its values are wrapped in an array indexed by the sub-form’s name (experience$id in your case).

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

Sidebar

Related Questions

I've got a Controller ActionResult that looks like this Function Edit(ByVal user As Domain.User,
I got a ASP.NET MVC controller like this [Authorize] public class ObjectController : Controller
I am using cakePHP 1.26. In a controller, I got a function which contains
I've got a controller class which accpets multiple parameters in the ctor which gets
I am learning cakePHP 1.26. I got a Controller which got two functions. I
So I've got a Users controller, and it has (amongst others) a function called
From my jQuery file, I call a function from my controller which returns a
I've got a master page which has a function in it called GetSiteMap() ,
As per here I've got the following controller: class User extends CI_Controller { public
I got an if-else script: $('#favitem').live('click', function () { var fid = $(this).parent().attr('id'); if

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.