I want to create a Form Type called ‘MyOwnMoneyType’ to display 2 fields: 1 text field for money value and 1 select field for currency. I want to display it in 1 row, so that I dont create 2 normal field (money and currency)
So my code will be like that:PHP1$builder->add('cost', 'my_own_money');
I already created a new form type, add 2 these fields in BuildForm, but I dont know how to parse the name of the field (in my case is ‘cost’) to the text field inside it.PHP123456789101112$builder->add('cost', 'oro_money') //I dont know how to parse dynamic field name here->add('currency','choice',array('choices' => array('USD' => 'USD','VND' => 'VND')));
Anyone have exp for this case?
You must be logged in to reply to this topic.