views:

18

answers:

1

I'm building an app for the company I work for in symfony, non the less the app might be pretty useful outside our company so we decided to write it in a more general form so we can make it multi company. I'm facing a problem on how to define a default value for a field that is going to be in every single model (company_id) so we don't need to select which company we belong to every time we want to add data. can anyone help me? I've tried

class TestForm extends BaseTestForm
{

    function configure()
    {
        $this->setDefault('company_id', '1');
    }
}

and when I submit the form I get a missing value for model .... Thanks

A: 
JaSk