Yii Framework Forum: Smarty form beginWidget - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Smarty form beginWidget Rate Topic: -----

#1 User is offline   hadi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 10-February 12

Posted 29 July 2012 - 11:40 AM

Mau tanya smarty form menggunakan beginWidget

Saya pake kode seperti ini:
{$this->beginWidget('CActiveForm', [
        'id'=>'contact-form',
        'enableClientValidation'=>true,
        'clientOptions'=>[
                'validateOnSubmit'=>true
        ]
],true)}


muncul pesan error:
Object of class CActiveForm could not be converted to string 


Apa yang perlu saya tambahkan?

Jika menggunakan widget (seperti kode dibawah) tidak bermasalah namun akan langsung terbentuk satu form (form buka dan form tutup):
{$this->widget('CActiveForm', [
        'id'=>'contact-form',
        'enableClientValidation'=>true,
        'clientOptions'=>[
                'validateOnSubmit'=>true
        ]
],true)}


hasil:
<form id=...></form>


Mohon pencerahan, thanks..
0

#2 User is offline   ahmadroni 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 250
  • Joined: 14-June 09
  • Location:Yogyakarta-Indonesia

Posted 04 August 2012 - 08:24 PM

kalo yang ini malah saya baru nemu gan.. cara membuat form seperti itu..!
Hospital Cost Management System and
Hospital Management Information System
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users