Yeah, I would create an action that returned a json object and create
the new from that.
On Wed, Jan 12, 2011 at 11:16 AM, Tom Haskins-Vaughan
wrote:
> Can you not set the service type on the object before you pass it to the form?
>
> $calculation = new Calculation();
> $calculation->setServiceT
Can you not set the service type on the object before you pass it to the form?
$calculation = new Calculation();
$calculation->setServiceType($my_value);
$form = new CalculationForm($calculation);
On Wed, Jan 12, 2011 at 8:12 AM, Emil Rømer Christensen
wrote:
> This is my Form class:
>
> class
This is my Form class:
class CalculationForm extends BaseCalculationForm {
private $service_type_id = 0;
public function configure() {
$this->useFields(array('model_id', 'motor_id',
'service_type_id'));
$this->widgetSchema['model_id']->setOption('add_empty',
'Choose...');
$this