Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
c69e6180
Commit
c69e6180
authored
Mar 13, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ActiveForm WIP
parent
5227d2db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
127 additions
and
1 deletion
+127
-1
ActiveForm.php
framework/widgets/ActiveForm.php
+127
-1
No files found.
framework/widgets/ActiveForm.php
View file @
c69e6180
<?php
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
class
ActiveForm
namespace
yii\widgets
;
use
yii\base\Widget
;
/**
* ActiveForm ...
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class
ActiveForm
extends
Widget
{
{
/**
* @var mixed the form action URL (see {@link CHtml::normalizeUrl} for details about this parameter).
* If not set, the current page URL is used.
*/
public
$action
=
''
;
/**
* @var string the form submission method. This should be either 'post' or 'get'.
* Defaults to 'post'.
*/
public
$method
=
'post'
;
/**
* @var string the CSS class name for error messages. Defaults to 'errorMessage'.
* Individual {@link error} call may override this value by specifying the 'class' HTML option.
*/
public
$errorMessageCssClass
=
'errorMessage'
;
/**
* @var array additional HTML attributes that should be rendered for the form tag.
*/
public
$htmlOptions
=
array
();
/**
* @var boolean whether to enable data validation via AJAX. Defaults to false.
* When this property is set true, you should respond to the AJAX validation request on the server side as shown below:
* <pre>
* public function actionCreate()
* {
* $model=new User;
* if(isset($_POST['ajax']) && $_POST['ajax']==='user-form')
* {
* echo CActiveForm::validate($model);
* Yii::app()->end();
* }
* ......
* }
* </pre>
*/
public
$enableAjaxValidation
=
false
;
/**
* @var boolean whether to enable client-side data validation. Defaults to false.
*
* When this property is set true, client-side validation will be performed by validators
* that support it (see {@link CValidator::enableClientValidation} and {@link CValidator::clientValidateAttribute}).
*
* @see error
* @since 1.1.7
*/
public
$enableClientValidation
=
false
;
public
function
errorSummary
(
$model
,
$options
=
array
())
{
}
public
function
error
(
$model
,
$attribute
,
$options
=
array
())
{
}
public
function
label
(
$model
,
$attribute
,
$options
=
array
())
{
}
public
function
input
(
$type
,
$model
,
$attribute
,
$options
=
array
())
{
return
''
;
}
public
function
textInput
(
$model
,
$attribute
,
$options
=
array
())
{
return
$this
->
input
(
'text'
,
$model
,
$attribute
,
$options
);
}
public
function
hiddenInput
(
$model
,
$attribute
,
$options
=
array
())
{
return
$this
->
input
(
'hidden'
,
$model
,
$attribute
,
$options
);
}
public
function
passwordInput
(
$model
,
$attribute
,
$options
=
array
())
{
return
$this
->
input
(
'password'
,
$model
,
$attribute
,
$options
);
}
public
function
fileInput
(
$model
,
$attribute
,
$options
=
array
())
{
return
$this
->
input
(
'file'
,
$model
,
$attribute
,
$options
);
}
public
function
textarea
(
$model
,
$attribute
,
$options
=
array
())
{
}
public
function
radio
(
$model
,
$attribute
,
$value
=
'1'
,
$options
=
array
())
{
}
public
function
checkbox
(
$model
,
$attribute
,
$value
=
'1'
,
$options
=
array
())
{
}
public
function
dropDownList
(
$model
,
$attribute
,
$items
,
$options
=
array
())
{
}
public
function
listBox
(
$model
,
$attribute
,
$items
,
$options
=
array
())
{
}
public
function
checkboxList
(
$model
,
$attribute
,
$items
,
$options
=
array
())
{
}
public
function
radioList
(
$model
,
$attribute
,
$items
,
$options
=
array
())
{
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment