Hi Sunpreet,
Thanks for replying!
I had tried that already as it seemed the most obvious place to put it but i got the follwoing error:
Fatal error: Method CForm::__toString() must not throw an exception in C:\wamp\nffc\protected\views\users\register.php on line 4
My code is below. When i comment out the CJuiDatePicker it works, when its in i get the error above. Any ideas?
<?php
return array(
'elements'=>array(
'user'=>array(
'type'=>'form',
'title'=>'Login information',
'elements'=>array(
'username'=>array(
'type'=>'text',
),
'password'=>array(
'type'=>'password',
),
'password_repeat'=>array(
'type'=>'password',
),
'emailAddress'=>array(
'type'=>'text',
)
),
),
'profile'=>array(
'type'=>'form',
'title'=>'Profile information',
'elements'=>array(
'firstname'=>array(
'type'=>'text',
),
'surname'=>array(
'type'=>'text',
),
'country'=>array(
'type'=>'text',
),
'dateOfBirth'=>array(
'type'=>'zii.widgets.jui.CJuiDatePicker',
'attributes' => array(
'firstDay' => 1,
'numberOfMonths' => 2,
),
),
'avatar'=>array(
'type'=>'text',
),
'information'=>array(
'type'=>'textarea',
),
'emailSubscribed'=>array(
'type'=>'checkbox',
),
'emailDisplay'=>array(
'type'=>'checkbox',
),
),
),
),
'buttons'=>array(
'register'=>array(
'type'=>'submit',
'label'=>'Register',
),
),
);