Source

EYuiDemo / protected / views / example / eyuiform2.php

<h1>EYuiForm Demo</h1>

<p>This form is created using <?php echo 
CHtml::link("eyui form editor",array('example/eyuiformeditor')) ?>.</p>

<p>Current selected user is: <?php echo $user->username.",".$user->email; ?></p>
<?php 
	// controller provides validationModel wich is an EYuiFormDb instance who will provide you
	// field values for current user (and provides extra validation too).
	$this->widget('ext.eyui.EYuiForm',array(
		'id'=>'form1',	// this is the 'form1'
		'label'=>'A Big Form',
		'model'=>EYuiFormDb::newModel($user),
		'showErrorResume'=>false,
		'jQueryUiEnabled'=>true,
		'jQueryControl'=>'tabs', // tabs or accordion
		'jQueryGroupControl'=>'', // use 'accordion' or leave blank
		'descriptionLocation'=>'title', // field description location: 'title' or 'visible'
		//
		// Using EYuiFormEditorDb stored fields: 
		//
		//	it will load all fields, groups and pages for model: 'mymodelid' and 'form1'
		//	
		//  it loads the pages, groups and fields for 'form1' at model 'mymodelid'
		//	(not the field values itself..! only form structure. the field values are loaded using the validationModel provided)
		'pages'=>EYuiFormEditorDb::model('mymodelid',"form1"),
	));
?>