oups … mistake ! …
in navbar.php, replace :
[<?php echo CHtml::link( 'form 1',array('JSVForm/TestForm','id'=>1) ); ?>]
with
[<?php echo CHtml::link( 'form 1',array('Jsvform/TestForm','id'=>1) ); ?>]
this should work ok.
Now for the code modification, this is simple. Assuming that you have correctly declared the jformvalidate extension in your protected/config/main.php file, here is how your view should look like :
<?php $JVF=Yii::app()->jformvalidate; // name of the component (config/main.php) echo $JVF->form(); // options below should be modified to fit your layout requirements $JVF->setOptions(array( 'errorContainer'=> "div.container", 'wrapper' => 'li', 'errorLabelContainer' => "div.container ul", 'errorClass' => "invalid", 'onkeyup' => false, 'onfocusout' => false )); ?> <?php echo CHtml::errorSummary($test); ?> <div class="simple"> <?php echo CHtml::activeLabelEx($test,'dob'); ?> <?php echo $JVF->activeTextField($test,'dob'); ?> </div> <div class="simple"> <?php echo CHtml::activeLabelEx($test,'married'); ?> <?php echo $JVF->activeCheckBox($test,'married'); ?> </div> <div class="simple"> <?php echo CHtml::activeLabelEx($test,'kids'); ?> <?php echo $JVF->activeTextField($test,'kids'); ?> </div> <?php echo $JVF->endForm(); ?> </form>
Now regarding what you described in this post (http://www.yiiframework.com/forum/index.php/topic,1191.0.html), this is out of the extension scope. What you should do is write a small Javascript program to handle this behaviour where, when the user checks the married box, then it enabled the kid edit box.
For instance you could add following at the end of your view file :
<script type="text/javascript"> /*<![CDATA[*/ jQuery(document).ready(function() { /* * replace KidsEditBoxId and marriedCheckBoxId with your actual ids */ $('#KidsEditBoxId').attr('disabled', ! $('#marriedCheckBoxId).attr('checked')); $('#marriedCheckBoxId').bind('click',function(e){ $('#KidsEditBoxId').attr('disabled', ! $(e.target).attr('checked')); }) }); /*]]>*/ </script>