hi! maybe a truly stupid question, but…how does one specify the controller/action to be invoked on submission of a CActiveForm-based form.
thanks a lot!
Ondra
hi! maybe a truly stupid question, but…how does one specify the controller/action to be invoked on submission of a CActiveForm-based form.
thanks a lot!
Ondra
ok, ok! so by default the URL of the action that created the form is used. what a nice voodoo, but i already get it: )
thanks!
you can post to any controller and any action with
<?php $form=$this->beginWidget(‘CActiveForm’, array(
'id'=>'newsletter-form',
'action'=>Yii::app()->createUrl('//newsletter/create'),
'enableAjaxValidation'=>false,
)); ?>
This IS the droid that I was looking for. Thank you
why there is ‘//newsletter/create’ not ‘/newsletter/create’ while creating the url ‘action’=>Yii::app()->createUrl(’//newsletter/create’),