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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:12:53+00:00 2026-05-13T10:12:53+00:00

Hy, What is correctness in symfony to fill a form in two steps? Imagine

  • 0

Hy,

What is correctness in symfony to fill a form in two steps? Imagine that we have a entity called Enterprise and we want to create a form with only required fields and another form, that when the user login can fill the other non-required fields.

How is the correctness form? Now i have a form to registration (‘lib/form/doctrine/EnterpriseForm.class.php’) and another (‘lib/form/doctrine/EnterpriseCompleteForm.class.php’).In every class we set labels, validators, … but the problem is in the second form. When i try to submit it gives me an error because i have’nt post required fields defined in model. How can i do that? Is that way correct? How can i fix this?

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-13T10:12:53+00:00Added an answer on May 13, 2026 at 10:12 am

    Well Felix, i do it “unset” changes and it works fine… but i have a problem. I try to do update on the same action. My code looks like that.

    in actions

     public function executeStepOne(sfWebRequest $request){
        $this->form = new CustomerFormStepOne();
    
        if ($request->isMethod(sfRequest::POST)){
            $this->processRegisterForm($request, $this->form,'paso2');
    
        }else{
            $this->customer = Doctrine::getTable('Customer')-> find(1);
                    $this->forward404Unless($this->customer);
        }   
      }
    

    where processRegisterForm code is :

    protected function processRegisterForm(sfWebRequest $request, sfForm $form,$route)
      {
        $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));    
        if ($form->isValid())
        {
          $customer = $form->save();  
          $this->redirect('customer/'.$route);
        }
      }
    

    if i try to do this they returns me an error ‘primary key duplicate’.

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

Sidebar

Related Questions

I have read numerous times that enforcing const-correctness in your C or C++ code
I have to validate XML file that contains embedded XML, with XML Schema. Correctness
I've run into some annoying issues with const-correctness in some templated code, that ultimately
In C++ it's recommended to have const-correctness everywhere. But since in .Net world, the
I know there are few question about const correctness where it is stated that
This is more of a correctness question. Say I have a table with a
I have a random question about const correctness. Lets say i have a class
I have few questions regarding safety and correctness of following hypothetical timer service: @Singleton
I'm developing a trigger that has to check the correctness of a date. I'm
I have seen comments breaking Java code, and I remember that brace style could

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.