1. Christian Salazar
  2. EYuiDemo


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>
	// controller provides validationModel wich is an EYuiFormDb instance who will provide you
	// field values for current user (and provides extra validation too).
		'id'=>'form1',	// this is the 'form1'
		'label'=>'A Big Form',
		'model'=>$validationModel, // provides user values for this field and specific validation.
		'submitButtonLabel'=>'Submit Form',
		'submitErrorText'=>'Please review for errors',
		'showErrorsLabel'=>'Show Errors',
		'formSubmittedOkLabel'=>'Form has been saved.',
		'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)