I get with my Yii application a contact form. Perfect !
I configure it in a very light fashion:
<?php $form=$this->beginWidget('CActiveForm', array(
Or maybe it is introduced via the widget CCaptcha.
However I see in my <head> part that jquery was introduced via assets.
And I don’t want that.
Is there a way (I can’t see that in Api doc) to indicate that jQuery has not to be loaded ?
(Maurizio Domba Cerin)
For this you can use the scriptMap - http://www.yiiframew…criptMap-detail
Search a bit on the forum for some examples…
Thanks but i do not understand however.
Why CCaptcha or CActiveForm includes jquery library whereas there is no need in my case ?
I don know why
To be more precise:
The CActiveForm comes in the Yii built in (contact). It is clearly attached to a model ContactForm
For me CActiveForm is used whenever there is no active record in database.
That is the case with the contact.
and the problem comes from
<?php $this->widget('CCaptcha'); ?>
when I delete this line, there is no jquery library used.
It seems that CCaptcha uses Ajax in is stuff when a button is inserted to refreseh (via Ajax) the code.
if I write
<?php $this->widget('CCaptcha',array('showRefreshButton'=>false)); ?>
then I specify that no ajax button is needed and then there is no problem.