I need to achieve in Yii something like this:
<form action="somescript.php#fragment-id">
Once the form get's submitted, the success message should appear in front of the user eyes. At this time, the message is displaying BUT, the browser goes back to the top.
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'contact-form',
'enableClientValidation'=>true,
)); ?>
//form here
<?php echo CHtml::submitButton('send')); ?>
<?php $this->endWidget(); ?>
I see something here called actionPrefix
, but it seems to be coming from another class:
CWidget
http://www.yiiframework.com/doc/api/1.1/CActiveForm
I've tried to add actionPrefix
like so:
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'contact-form',
'enableClientValidation'=>true,
'actionPrefix'=>'fragment-id'
)); ?>
No dice.
Please advice