I need to pass data-ajax = "false" property to the form. This property is needed for jQuery Mobile to make it stop loading pages with Ajax.
Here is my code:
<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'login-form',
'enableClientValidation'=>true,
'clientOptions'=>array(
'validateOnSubmit'=>true,
),
'focus'=>array($model,'username'),
'data-ajax'=>false,
)); ?>
......
<?php $this->endWidget(); ?>
</div><!-- form -->
so my html output would look like this:
<form id="login-form" method="post" action="/*********" data-ajax ="false">
Unfortunately im getting a CException "Property "CActiveForm.data-ajax" is not defined." error. Am I missing something?
solved this problem by adding
'htmlOptions' => array("data-ajax"=>"false")
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'login-form',
'enableClientValidation'=>true,
'clientOptions'=>array(
'validateOnSubmit'=>true,
),
'htmlOptions' => array("data-ajax"=>"false"),
'focus'=>array($model,'username'),
)); ?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With