Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TbActiveForm AJAX validation not working when type => inline #242

Closed
irvinlee opened this issue Jan 10, 2013 · 2 comments
Closed

TbActiveForm AJAX validation not working when type => inline #242

irvinlee opened this issue Jan 10, 2013 · 2 comments

Comments

@irvinlee
Copy link

 $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
                'type' => 'inline',
                'enableAjaxValidation'=>true,
                'enableClientValidation'=>true,
                'clientOptions' => array(
                    'validateOnSubmit'=>true,
                    'validateOnChange'=>true,
                    'validateOnType'=>true,     
                ),
            )); 

AJAX validation is not being triggered (i.e., no XMLHTTPRequests are being made) whenever the user updates field values.
When I removed 'type' => 'inline', it worked...
Is this something that was done on purpose? If not, then I would like to fix it. :)

@tonydspaniard
Copy link
Contributor

Not done purposely, feel free to collaborate :)

@digitalcrab
Copy link
Contributor

This is my varian of inline validators status:
http://yii-demo.yukki.name/bootstrap/issue242

Code:

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id' => 'TestDbModel',
    'type' => 'inline',
    'enableAjaxValidation'=>true,
    'enableClientValidation'=>true,
    'clientOptions' => array(
        'validateOnSubmit'=>true,
        'validateOnChange'=>true,
        'validateOnType'=>true,
    ),
));

echo $form->textFieldRow($model, 'email');

$this->widget('bootstrap.widgets.TbButton', array(
    'label' => 'Ok',
));

$this->endWidget();

Thank you @irvinlee for your issue, it is done and will be included to the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants