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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:18:09+00:00 2026-06-07T18:18:09+00:00

part of my code in listForm.class.php: public function configure() { $list_id = $this->getOption(‘list_id’); $endkunde_id

  • 0

part of my code in listForm.class.php:

public function configure() {
    $list_id = $this->getOption('list_id');
    $endkunde_id = $this->getOption('endkunde_id');
    $shopname_id = 1;


    $todoWrapperForm = new sfForm();
    $todoWrapperForm = new sfForm();
    //$todos = Doctrine_Core::getTable('Todo')->findAll();


    //$todos = Doctrine_Core::getTable('EinkaufslisteElemente')->findAll();
    $todos = Doctrine_Core::getTable('EinkaufslisteElemente')
            ->createQuery('ee')
            ->where('ee.einkaufsliste_id = ?', $list_id)
            ->innerJoin('ee.Einkaufsliste e')

            ->andWhere('e.shopname_id = ?', $shopname_id)
           ->innerJoin('e.EinkaufslisteEndkunde ek')
            ->execute();


    foreach ($todos as $todo) {
        $todoWrapperForm->embedForm($todo->getId(), new EinkaufslisteElementeForm($todo));
    }
    $todoWrapperForm->embedForm('new_1', new EinkaufslisteElementeForm());  // add one blank todo to start
    $this->embedForm('todos', $todoWrapperForm);


        $this->list =  new sfWidgetFormTextarea(array(), array('rows' => '10', 'cols' => '35'));

    $this->mergePostValidator(new sfValidatorDoctrineUnique(array('model'=>'todo', 'column'=>'task'), array('required' => false)))               ;
    $this->widgetSchema->setNameFormat('todo_list[%s]');
}

I want to create an extra field from ‘Customer’ with his name which is not hidden, and I want to create an input field hidden with the list_id from the table ‘List’. How can I do it with embedForm?

  • 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-07T18:18:10+00:00Added an answer on June 7, 2026 at 6:18 pm

    Inside your listForm, just add at the bottom of your configure:

    $this->widgetSchema['list_id']    = new sfWidgetFormInputHidden();
    // do not forget to add the propel validator (ie: the one that can check if `list_id` is ok - like in the database)
    $this->validatorSchema['list_id'] = new sfValidatorPass();
    

    Then, in your action, don’t forget to set a default to list_id:

    $form = new listForm();
    $form->setDefault('list_id', $list_id);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this part of code in my functions.php: function cc_admin_enqueue_scripts($hook) { $file_dir=get_bloginfo('template_directory'); wp_enqueue_script('media-upload');
I'm having this (part of) code in my header class Node { Node prevNode;
I have this part of code in my application. card.getcard(command, function(toproceed,resultscard) { console.log('entry other
I've this part of code: public void onClickHandler(View a) { String pressed = null;
I am trying to learn and writting this part of code. while testing few
i have this simple question please. I have this part of code which sets
I'm studying data structures (List, Stack, Queue), and this part of code is confusing
Part of my code I get the OuterHTML propery <LI onclick=TabClicked(this, 'SearchName', 'TabGroup1');>Name so
Part of my code goes like this: while(1){ my $winmm = new Win32::MediaPlayer; $winmm->load('1.mp3');
I have this part of code that was compiling using ARMASM : /* Software

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.