Hi,
just tried to convert the default contact form into the new form builder CForm. I’ve no clue how to implement the CCaptcha widget. Any ideas?
<?php
return array(
'elements' => array(
'name' => array(
'type' => 'text',
'class' => 'span-6',
),
'email' => array(
'type' => 'text',
'class' => 'span-6',
),
'body' => array(
'type' => 'textarea',
'class' => 'span-6',
'cols' => 50,
'rows' => 10,
),
Yii::app()->controller->widget('CCaptcha'),
'capatcha' => array(
'label' => Yii::t('form', 'Insert verification code'),
'type' => 'text',
),
),
'buttons' => array(
'submit' => array(
'type' => 'submit',
'label' => Yii::t('form', 'submit'),
),
),
);