Class AdminPageFramework_FieldType_inline_mixed
A field that includes child fields with different field types.
This class defines the inline_mixed
field type.
Field Definition Arguments
Field Type Specific Arguments
- content - (optional, array) an array holding child field definition arrays.
Common Field Definition Arguments
For common field definition arguments, seeAdminPageFramework_Factory_Controller::addSettingField()
.
Example
Check box, Number and Select
array( 'field_id' => 'checkbox_number_select', 'type' => 'inline_mixed', 'title' => __( 'Checkbox, Number & Select', 'admin-page-framework-loader' ), 'content' => array( array( 'field_id' => 'enable', 'type' => 'checkbox', 'label_min_width' => '', 'label' => __( 'Do something in', 'admin-page-framework-loader' ), ), array( 'field_id' => 'interval', 'type' => 'number', 'label_min_width' => '', 'default' => 3, 'attributes' => array( 'style' => 'width: 80px', ), ), array( 'field_id' => 'interval_unit', 'type' => 'select', 'label_min_width' => '', 'label' => array( 'hour' => __( 'hours', 'admin-page-framework-loader' ), 'day' => __( 'days', 'admin-page-framework-loader' ), 'week' => __( 'weeks', 'admin-page-framework-loader' ), ), 'default' => 'day', ), array( 'field_id' => '_text', 'content' => __( 'to do something else.', 'admin-page-framework-loader' ), ), ), )
Text and Number
array( 'field_id' => 'text_number', 'type' => 'inline_mixed', 'title' => __( 'Text & Number', 'admin-page-framework-loader' ), 'repeatable' => true, 'content' => array( __( 'Server', 'admin-page-framework-loader' ), array( 'field_id' => 'server', 'type' => 'text', 'default' => 'www.wordpress.org', 'attributes' => array( 'fieldset' => array( 'style' => 'min-width: 400px;', ) ), ), __( 'Port', 'admin-page-framework-loader' ), array( 'field_id' => 'port', 'type' => 'number', 'label_min_width' => '', 'default' => 3, 'attributes' => array( // 'style' => 'width: 80px', ), ), ), )
Custom Layout
array( 'field_id' => 'shipping_address', 'title' => __( 'Shipping Information', 'admin-page-framework-loader' ), 'type' => 'inline_mixed', 'repeatable' => true, 'sortable' => true, 'content' => array( array( 'field_id' => 'first_name', 'type' => 'text', 'title' => __( 'First Name', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 48%; padding-right: 2%;', ), ), ), array( 'field_id' => 'last_name', 'type' => 'text', 'title' => __( 'Last Name', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 48%; padding-right: 2%;', ), ), ), array( 'field_id' => 'mailing_address', 'type' => 'text', 'title' => __( 'Street Address', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 98%; padding-right: 2%;', ), ), ), array( 'field_id' => 'city', 'type' => 'text', 'title' => __( 'City/Town', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 36%; padding-right: 2%;', ), ), ), array( 'field_id' => 'state', 'type' => 'text', 'title' => __( 'State/Province', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 36%; padding-right: 2%;', ), ), ), array( 'field_id' => 'zip', 'type' => 'text', 'title' => __( 'Zip/Postal Code', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 22%; padding-right: 2%;', ), ), ), array( 'field_id' => 'telephone', 'type' => 'text', 'title' => __( 'Tel. No.', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 31%; padding-right: 2%;', ), ), ), array( 'field_id' => 'fax', 'type' => 'text', 'title' => __( 'Fax No.', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 31%; padding-right: 2%;', ), ), ), array( 'field_id' => 'email', 'type' => 'text', 'title' => __( 'Email', 'admin-page-framework-loader' ), 'attributes' => array( 'fieldset' => array( 'style' => 'width: 32%; padding-right: 2%;', ), ), ), ), )
Package: AdminPageFramework\Common\Form\FieldType
Since: 3.8.0
Extends: AdminPageFramework_FieldType__nested
Image: http://admin-page-framework.michaeluno.jp/image/common/form/field_type/inline_mixed.png
Located at factory/_common/form/field_type/inline_mixed/AdminPageFramework_FieldType_inline_mixed.php
Since: 3.8.0
Extends: AdminPageFramework_FieldType__nested
Image: http://admin-page-framework.michaeluno.jp/image/common/form/field_type/inline_mixed.png
Located at factory/_common/form/field_type/inline_mixed/AdminPageFramework_FieldType_inline_mixed.php
Methods summary
Magic methods summary
Properties summary
public
array
|
$aFieldTypeSlugs |
#
Defines the field type slugs used for this field type. |
protected
array
|
$aDefaultKeys |
#
Defines the default key-values of this field type. Remark
$_aDefaultKeys holds shared default key-values defined in the base class.
|