diff --git a/docs/en/views/helpers/form.md b/docs/en/views/helpers/form.md
index 9ae5b49803..217f3d5126 100644
--- a/docs/en/views/helpers/form.md
+++ b/docs/en/views/helpers/form.md
@@ -118,7 +118,7 @@ happens. This special array can contain a number of different
key-value pairs that affect the way the form tag is generated.
Valid values:
-- `'type'` - Allows you to choose the type of form to create. If no type is
+- `type` - Allows you to choose the type of form to create. If no type is
provided then it will be autodetected based on the form context.
Valid values:
- `'get'` - Will set the form method to HTTP GET.
@@ -127,21 +127,21 @@ Valid values:
- `'post'` - Will set the method to POST.
- `'put', 'delete', 'patch'` - Will override the HTTP method with PUT,
DELETE or PATCH respectively, when the form is submitted.
-- `'method'` - Valid values are the same as above. Allows you to explicitly
+- `method` - Valid values are the same as above. Allows you to explicitly
override the form's method.
-- `'url'` - Specify the URL the form will submit to. Can be a string or a URL
+- `url` - Specify the URL the form will submit to. Can be a string or a URL
array.
-- `'encoding'` - Sets the `accept-charset` encoding for the form. Defaults
+- `encoding` - Sets the `accept-charset` encoding for the form. Defaults
to `Configure::read('App.encoding')`.
-- `'enctype'` - Allows you to set the form encoding explicitly.
-- `'templates'` - The templates you want to use for this form. Any templates
+- `enctype` - Allows you to set the form encoding explicitly.
+- `templates` - The templates you want to use for this form. Any templates
provided will be merged on top of the already loaded templates. Can be either
a filename (without extension) from `/config` or an array of templates to use.
-- `'context'` - Additional options for the form context class. (For example
+- `context` - Additional options for the form context class. (For example
the `EntityContext` accepts a `'table'` option that allows you to set the
specific Table class the form should be based on.)
-- `'idPrefix'` - Prefix for generated ID attributes.
-- `'templateVars'` - Allows you to provide template variables for the
+- `idPrefix` - Prefix for generated ID attributes.
+- `templateVars` - Allows you to provide template variables for the
`formStart` template.
- `autoSetCustomValidity` - Set to `true` to use custom required and notBlank
validation messages in the control's HTML5 validity message. Default is `true`.
@@ -743,10 +743,10 @@ by the `control()` method.
To reduce repetition, the common options shared by all control methods are
as follows:
-- `'id'` - Set this key to force the value of the DOM id for the control.
+- `id` - Set this key to force the value of the DOM id for the control.
This will override the `'idPrefix'` that may be set.
-- `'default'` - Used to set a default value for the control field. The
+- `default` - Used to set a default value for the control field. The
value is used if the data passed to the form does not contain a value for the
field (or if no data is passed at all). If no default value is provided, the
column's default value will be used.
@@ -774,7 +774,7 @@ as follows:
> used to disable/exclude options of a control field, so `'default' => false`
> would not set any value at all. Instead use `'default' => 0`.
-- `'value'` - Used to set a specific value for the control field. This
+- `value` - Used to set a specific value for the control field. This
will override any value that may else be injected from the context, such as
Form, Entity or `request->getData()` etc.
@@ -906,7 +906,7 @@ Example:
In addition to the [General Control Options](#general-control-options), `textarea()` supports a
couple of specific options:
-- `'escape'` - Determines whether or not the contents of the textarea should
+- `escape` - Determines whether or not the contents of the textarea should
be escaped. Defaults to `true`.
For example:
@@ -917,7 +917,7 @@ couple of specific options:
echo $this->Form->control('notes', ['type' => 'textarea', 'escape' => false]);
```
-- `'rows', 'cols'` - You can use these two keys to set the HTML attributes
+- `rows, cols` - You can use these two keys to set the HTML attributes
which specify the number of rows and columns for the `textarea` field.
For example:
@@ -946,7 +946,7 @@ You can find below the options which are shared by `select()`,
`checkbox()` and `radio()` (the options particular only to one of the
methods are described in each method's own section.)
-- `'value'` - Sets or selects the value of the affected element(s):
+- `value` - Sets or selects the value of the affected element(s):
- For checkboxes, it sets the HTML `'value'` attribute assigned
to the `input` element to whatever you provide as value.
@@ -983,7 +983,7 @@ methods are described in each method's own section.)
);
```
-- `'empty'` - Applies to `radio()` and `select()`. Defaults to `false`.
+- `empty` - Applies to `radio()` and `select()`. Defaults to `false`.
- When passed to `radio()` and set to `true` it will create an extra
input element as the first radio button, with a value of `''` and a
@@ -1016,7 +1016,7 @@ methods are described in each method's own section.)
```
-- `'hiddenField'` - For checkboxes and radio buttons, by default,
+- `hiddenField` - For checkboxes and radio buttons, by default,
a hidden `input` element is also created, along with the main
element, so that the key in `$this->request->getData()`
will exist even without a value specified. For checkboxes its value
@@ -1137,9 +1137,9 @@ Creates a `checkbox` form element. The widget template used is:
**Options for Checkboxes**
-- `'checked'` - Boolean to indicate whether this checkbox will be checked.
+- `checked` - Boolean to indicate whether this checkbox will be checked.
Defaults to `false`.
-- `'disabled'` - Create a disabled checkbox input.
+- `disabled` - Create a disabled checkbox input.
This method also generates an associated hidden
form `input` element to force the submission of data for
@@ -1215,14 +1215,14 @@ Creates a set of radio button inputs. The default widget templates used are:
**Attributes for Radio Buttons**
-- `'label'` - Boolean to indicate whether or not labels for widgets should be
+- `label` - Boolean to indicate whether or not labels for widgets should be
displayed, or an array of attributes to apply to all labels. In case a `class`
attribute is defined, `selected` will be added to the `class` attribute of
checked buttons. Defaults to `true`.
-- `'hiddenField'` - If set to `true` a hidden input with a value of `''`
+- `hiddenField` - If set to `true` a hidden input with a value of `''`
will be included. This is useful for creating radio sets that are
non-continuous. Defaults to `true`.
-- `'disabled'` - Set to `true` or `'disabled'` to disable all the radio
+- `disabled` - Set to `true` or `'disabled'` to disable all the radio
buttons. Defaults to `false`.
You must provide the label captions for the radio buttons via the `$options`
@@ -1353,13 +1353,13 @@ May also use:
**Attributes for Select Pickers**
-- `'multiple'` - If set to `true` allows multiple selections in the select
+- `multiple` - If set to `true` allows multiple selections in the select
picker. If set to `'checkbox'`, multiple checkboxes will be created instead.
Defaults to `null`.
-- `'escape'` - Boolean. If `true` the contents of the `option` elements
+- `escape` - Boolean. If `true` the contents of the `option` elements
inside the select picker will be HTML entity encoded. Defaults to `true`.
-- `'val'` - Allows preselecting a value in the select picker.
-- `'disabled'` - Controls the `disabled` attribute. If set to `true`
+- `val` - Allows preselecting a value in the select picker.
+- `disabled` - Controls the `disabled` attribute. If set to `true`
disables the whole select picker. If set to an array it will disable
only those specific `option` elements whose values are provided in
the array.
@@ -1467,7 +1467,7 @@ Output:
By using specific options in the `$attributes` parameter you can control
certain behaviors of the `select()` method.
-- `'empty'` - Set the `'empty'` key in the `$attributes` argument
+- `empty` - Set the `'empty'` key in the `$attributes` argument
to `true` (the default value is `false`) to add a blank option with an
empty value at the top of your dropdown list.
@@ -1488,7 +1488,7 @@ certain behaviors of the `select()` method.
```
-- `'escape'` - The `select()` method allows for an attribute
+- `escape` - The `select()` method allows for an attribute
called `'escape'` which accepts a boolean value and determines
whether to HTML entity encode the contents of the `select`'s `option`
elements.
@@ -1501,7 +1501,7 @@ certain behaviors of the `select()` method.
echo $this->Form->select('gender', $options, ['escape' => false]);
```
-- `'multiple'` - If set to `true`, the select picker will allow
+- `multiple` - If set to `true`, the select picker will allow
multiple selections.
For example:
@@ -1541,7 +1541,7 @@ certain behaviors of the `select()` method.
```
-- `'disabled'` - This option can be set in order to disable all or some
+- `disabled` - This option can be set in order to disable all or some
of the `select`'s `option` items. To disable all items set `'disabled'`
to `true`. To disable only certain items, assign to `'disabled'`
an array containing the keys of the items to be disabled.
@@ -2017,9 +2017,9 @@ By default, it will use the following widget templates:
**Options for Submit**
-- `'type'` - Set this option to `'reset'` in order to generate reset buttons.
+- `type` - Set this option to `'reset'` in order to generate reset buttons.
It defaults to `'submit'`.
-- `'templateVars'` - Set this array to provide additional template variables
+- `templateVars` - Set this array to provide additional template variables
for the input element and its container.
- Any other provided attributes will be assigned to the `input` element.
@@ -2065,18 +2065,18 @@ of `'button'`.
**Options for Button**
-- `'type'` - You can set this to one of the following three
+- `type` - You can set this to one of the following three
possible values:
1. `'submit'` - Similarly to the `$this->Form->submit()` method it will
create a submit button. However this won't generate a wrapping `div`
as `submit()` does. This is the default type.
2. `'reset'` - Creates a form reset button.
3. `'button'` - Creates a standard push button.
-- `'escapeTitle'` - Boolean. If set to `true` it will HTML encode
+- `escapeTitle` - Boolean. If set to `true` it will HTML encode
the value provided inside `$title`. Defaults to `true`.
-- `'escape'` - Boolean. If set to `true` it will HTML encode
+- `escape` - Boolean. If set to `true` it will HTML encode
all the HTML attributes generated for the button. Defaults to `true`.
-- `'confirm'` - The confirmation message to display on click. Defaults to
+- `confirm` - The confirmation message to display on click. Defaults to
`null`.
For example:
@@ -2172,10 +2172,10 @@ FormProtectionComponent.
**Options for POST Button**
-- `'data'` - Array with key/value to pass in hidden input.
-- `'method'` - Request method to use. E.g. set to `'delete'` to
+- `data` - Array with key/value to pass in hidden input.
+- `method` - Request method to use. E.g. set to `'delete'` to
simulate a HTTP/1.1 DELETE request. Defaults to `'post'`.
-- `'form'` - Array with any option that `FormHelper::create()` can take.
+- `form` - Array with any option that `FormHelper::create()` can take.
- Also, the `postButton()` method will accept the options which are valid for
the `button()` method.
@@ -2234,12 +2234,12 @@ Creates an HTML link, but accesses the URL using the method you specify
**Options for POST Link**
-- `'data'` - Array with key/value to pass in hidden input.
-- `'method'` - Request method to use. For example, setting it to `'delete'`
+- `data` - Array with key/value to pass in hidden input.
+- `method` - Request method to use. For example, setting it to `'delete'`
will simulate a HTTP/1.1 DELETE request. Defaults to `'post'`.
-- `'confirm'` - The confirmation message to display on click. Defaults to
+- `confirm` - The confirmation message to display on click. Defaults to
`null`.
-- `'block'` - Set this option to `true` to append the form to view block
+- `block` - Set this option to `true` to append the form to view block
`'postLink'` or provide a custom block name. Defaults to `null`.
- Also, the `postLink` method will accept the options which are valid for
the `link()` method.
diff --git a/docs/ja/views/helpers/form.md b/docs/ja/views/helpers/form.md
index c5c2348b8e..b94ef6ecd7 100644
--- a/docs/ja/views/helpers/form.md
+++ b/docs/ja/views/helpers/form.md
@@ -111,7 +111,7 @@ URL に ID が付加されることを避けたい場合、 `$options['url']`
form タグの生成方法に影響を与えるさまざまなキーと値のペアが含まれます。
有効な値:
-- `'type'` - 作成するフォームの種類を選択できます。type が未指定の場合、
+- `type` - 作成するフォームの種類を選択できます。type が未指定の場合、
フォームコンテキストに基づいて自動的に決まります。
有効な値:
- `'get'` - フォームの method に HTTP GET を設定します。
@@ -120,19 +120,19 @@ form タグの生成方法に影響を与えるさまざまなキーと値のペ
- `'post'` - method に POST を設定します。
- `'put', 'delete', 'patch'` - フォームの送信時に、HTTP メソッドを
PUT、 DELETE もしくは PATCH に上書きします。
-- `'method'` - 有効な値は、上記と同じです。フォームの method を明示的に上書きできます。
-- `'url'` - フォームを送信する URL を指定します。文字列および URL 配列を指定できます。
-- `'encoding'` - フォームに `accept-charset` エンコーディングをセットします。
+- `method` - 有効な値は、上記と同じです。フォームの method を明示的に上書きできます。
+- `url` - フォームを送信する URL を指定します。文字列および URL 配列を指定できます。
+- `encoding` - フォームに `accept-charset` エンコーディングをセットします。
デフォルトは、 `Configure::read('App.encoding')` です。
-- `'enctype'` - 明示的にフォームのエンコーディングをセットできます。
-- `'templates'` - このフォームで使用したいテンプレート。指定したテンプレートは、
+- `enctype` - 明示的にフォームのエンコーディングをセットできます。
+- `templates` - このフォームで使用したいテンプレート。指定したテンプレートは、
既に読み込まれたテンプレートの上にマージされます。 `/config` のファイル名 (拡張子を除く) か、
使用したいテンプレートの配列のいずれかを指定します。
-- `'context'` - フォームコンテキストクラスの追加オプション。(例えば、
+- `context` - フォームコンテキストクラスの追加オプション。(例えば、
`EntityContext` は、フォームのベースとなる特定の Table クラスを設定するための
`'table'` オプションを受け付けます。)
-- `'idPrefix'` - 生成された ID 属性のプレフィックス。
-- `'templateVars'` - `formStart` テンプレートのためのテンプレート変数を提供することができます。
+- `idPrefix` - 生成された ID 属性のプレフィックス。
+- `templateVars` - `formStart` テンプレートのためのテンプレート変数を提供することができます。
- `autoSetCustomValidity` - コントロールの HTML5 検証メッセージでカスタム必須および notBlank 検証メッセージを使用するには、
`true` を設定します。デフォルトは `false` です。
@@ -321,6 +321,8 @@ $this->Form->addContextProvider('myprovider', function ($request, $data) {
ロジックを追加できます。一致する入力データが見つかった場合は、オブジェクトを返すことができます。
一致するものがない場合は null を返します。
+
+
## フォームコントロールの作成
`method` Cake\\View\\Helper\\FormHelper::**control**(string $fieldName, array $options = [])
@@ -529,6 +531,8 @@ datetime に関連するコントロールを作成する場合、FormHelper は
というフィールドが追加されていることがあります。エンティティーがマーシャリングされると、
これらのフィールドは自動的に `DateTime` オブジェクトに変換されます。
+
+
### コントロールのオプション
`FormHelper::control()` は、その `$options` 引数を通して、多数のオプションをサポートしています。
@@ -688,6 +692,8 @@ HTML 属性を受け付けます。以下は `FormHelper::control()` で特有
`Cake\View\Helper\FormHelper::error()` といった
他のメソッドを組み合わせることができます。
+
+
### 特定のコントロールのための共通オプション
さまざまなコントロール要素メソッドは、共通のオプションをサポートしており、
@@ -695,10 +701,10 @@ HTML 属性を受け付けます。以下は `FormHelper::control()` で特有
指定する必要があります。これらのオプションはすべて、 `control()` でもサポートされています。
繰り返しを減らすために、すべてのコントロールメソッドで共有される共通オプションは次の通りです。
-- `'id'` - このキーを設定すると、コントロールの DOM id の値が強制的に設定されます。
+- `id` - このキーを設定すると、コントロールの DOM id の値が強制的に設定されます。
これにより、設定可能な `'idPrefix'` が上書きされます。
-- `'default'` コントロールフィールドのデフォルト値を設定します。
+- `default` コントロールフィールドのデフォルト値を設定します。
この値は、フォームに渡されるデータにそのフィールドに関する値が含まれていない場合
(または、一切データが渡されない場合) に使われます。
明示的なデフォルト値は、スキーマで定義されたデフォルト値を上書きします。
@@ -726,7 +732,7 @@ HTML 属性を受け付けます。以下は `FormHelper::control()` で特有
> そのため `'default' => false` では値を全く設定しません。
> 代わりに `'default' => 0` を使用してください。
-- `'value'` - コントロールフィールドに特定の値を設定するために使用します。
+- `value` - コントロールフィールドに特定の値を設定するために使用します。
これは、Form、Entity、 `request->getData()` などのコンテキストから
注入される可能性のある値を上書きします。
@@ -850,7 +856,7 @@ echo $this->Form->textarea('notes');
[General Control Options](#general-control-options) に加えて、 `textarea()` はいくつかの固有のオプションを
サポートします。
-- `'escape'` - テキストエリアの内容をエスケープするかどうかを指定します。
+- `escape` - テキストエリアの内容をエスケープするかどうかを指定します。
デフォルトは `true` です。
例:
@@ -861,7 +867,7 @@ echo $this->Form->textarea('notes');
echo $this->Form->control('notes', ['type' => 'textarea', 'escape' => false]);
```
-- `'rows', 'cols'` - これらの2つのキーを使用して、 `textarea` フィールドの行数と列数を
+- `rows, cols` - これらの2つのキーを使用して、 `textarea` フィールドの行数と列数を
指定する HTML 属性を設定することができます。
例:
@@ -882,12 +888,14 @@ echo $this->Form->textarea('notes');
これらのコントロールは、いくつかの共通点といくつかのオプションを共有し、
それらは簡単に参照するために、このサブセクションで全てグループ化します。
+
+
#### セレクト、チェックボックス、ラジオに関するオプション
`select()` 、 `checkbox()` そして `radio()` によって共有されるオプションは次の通りです。
(各メソッドの独自のセクションには、そのメソッド特有のオプションが記述されています。)
-- `'value'` - 影響を受ける要素の値を設定または選択します。
+- `value` - 影響を受ける要素の値を設定または選択します。
- チェックボックスの場合、 `input` 要素に割り当てられた HTML の `'value'` 属性を、
値として提供するものに設定します。
@@ -922,7 +930,7 @@ echo $this->Form->textarea('notes');
);
```
-- `'empty'` - `radio()` と `select()` に適用します。デフォルトは `false` です。
+- `empty` - `radio()` と `select()` に適用します。デフォルトは `false` です。
- `radio()` に渡して `true` を設定すると、最初のラジオボタンとして追加の入力要素を作成し、
値を `''` に、ラベルを `'empty'` にします。ラベルキャプションを制御する場合は、
@@ -953,7 +961,7 @@ echo $this->Form->textarea('notes');
```
-- `'hiddenField'` - チェックボックスとラジオボタンの場合、デフォルトでは、
+- `hiddenField` - チェックボックスとラジオボタンの場合、デフォルトでは、
メインの要素とともに hidden `input` 要素も作成されます。そのため、
値の指定がなくても、 `$this->request->getData()` の中のキーは必ず存在します。
その値のデフォルトは、チェックボックスの場合は `0` 、ラジオボタンの場合は `''` です。
@@ -1070,9 +1078,9 @@ $options = $examples->map(function ($value, $key) {
**チェックボックスのオプション**
-- `'checked'` - このチェックボックスをオンにするかどうかを示すブール値。
+- `checked` - このチェックボックスをオンにするかどうかを示すブール値。
デフォルトは `false` です。
-- `'disabled'` - 入力不可のチェックボックスを作成。
+- `disabled` - 入力不可のチェックボックスを作成。
このメソッドは、関連する隠しフォームの `input` 要素も生成し、
指定されたフィールドのデータの送信を強制します。
@@ -1119,6 +1127,8 @@ echo $this->Form->checkbox('done', ['hiddenField' => false]);
```
+
+
#### ラジオボタンの作成
`method` Cake\\View\\Helper\\FormHelper::**radio**(string $fieldName, array $options, array $attributes)
@@ -1141,12 +1151,12 @@ radio ボタン入力を作成します。使用されるデフォルトのウ
**ラジオボタンの属性**
-- `'label'` - ウィジェットのラベルを表示するかどうかを示すブール値、または、全てのラベルに適用する
+- `label` - ウィジェットのラベルを表示するかどうかを示すブール値、または、全てのラベルに適用する
属性の配列。 `class` 属性が定義されている場合、チェックされたボタンの `class` 属性に
`selected` が追加されます。デフォルトは `true` 。
-- `'hiddenField'` - `true` に設定すると、 `''` の値を持つ非表示の入力がインクルードされます。
+- `hiddenField` - `true` に設定すると、 `''` の値を持つ非表示の入力がインクルードされます。
これは、非連続的なラジオセットを作成する場合に便利です。デフォルトは `true` 。
-- `'disabled'` - すべてのラジオボタンを無効にするには `true` または
+- `disabled` - すべてのラジオボタンを無効にするには `true` または
`'disabled'` に設定します。デフォルトは `false` 。
`$options` 引数を通してラジオボタンのラベルの見出しを指定してください。
@@ -1209,6 +1219,8 @@ echo $this->Form->radio(
```
+
+
#### 選択ピッカーの作成
`method` Cake\\View\\Helper\\FormHelper::**select**(string $fieldName, array $options, array $attributes)
@@ -1242,13 +1254,13 @@ echo $this->Form->radio(
**選択ピッカーの属性**
-- `'multiple'` - `true` をセットすると、選択ピッカー内で複数選択ができます。
+- `multiple` - `true` をセットすると、選択ピッカー内で複数選択ができます。
`'checkbox'` をセットすると、複数チェックボックスが代わりに作成されます。
デフォルトは `null` です。
-- `'escape'` - ブール値。 `true` の場合、選択ピッカー内の `option` 要素の内容は
+- `escape` - ブール値。 `true` の場合、選択ピッカー内の `option` 要素の内容は
エンコードされた HTML エンティティーになります。デフォルトは `true` です。
-- `'val'` - 選択ピッカーで値を事前に選択できるようにします。
-- `'disabled'` - `disabled` 属性を制御します。
+- `val` - 選択ピッカーで値を事前に選択できるようにします。
+- `disabled` - `disabled` 属性を制御します。
`true` をセットした場合、選択ピッカー全体を無効にします。
配列をセットした場合、配列に含まれている値を持つ特定の `option` のみ無効にします。
@@ -1353,7 +1365,7 @@ echo $this->Form->select('field', $options);
`$attributes` パラメーター内の特定のオプションを使用することにより、
`select()` メソッドの特定の振る舞いを制御することができます。
-- `'empty'` - `$attributes` 引数の中で `'empty'` キーを `true` にセットすると
+- `empty` - `$attributes` 引数の中で `'empty'` キーを `true` にセットすると
(デフォルトの値は `false`)、ドロップダウンリストの先頭に空の値の空白オプションを追加できます。
例:
@@ -1373,7 +1385,7 @@ echo $this->Form->select('field', $options);
```
-- `'escape'` - `select()` メソッドは `'escape'` という属性が使用でき、
+- `escape` - `select()` メソッドは `'escape'` という属性が使用でき、
ブール値を受け取り、HTML エンティティーに select オプションの内容をエンコードするかどうかを決定します。
例:
@@ -1384,7 +1396,7 @@ echo $this->Form->select('field', $options);
echo $this->Form->select('gender', $options, ['escape' => false]);
```
-- `'multiple'` - `true` にセットすると、選択ピッカーは複数選択ができます。
+- `multiple` - `true` にセットすると、選択ピッカーは複数選択ができます。
例:
@@ -1423,7 +1435,7 @@ echo $this->Form->select('field', $options);
```
-- `'disabled'` - このオプションを設定して、すべてまたは一部の `select` の `option` 項目を
+- `disabled` - このオプションを設定して、すべてまたは一部の `select` の `option` 項目を
無効にすることができます。すべての項目を無効にするには、 `'disabled'` に `true` を
設定します。特定の項目のみを無効にするには、無効にする項目をキーに含む配列を `'disabled'` に
設定してください。
@@ -1560,36 +1572,40 @@ $this->request->data['submittedfile']
これらのオプションは、日付と時刻に関するコントロールに共通します。
-- `'empty'` - `true` の場合、余分の空の `option` HTML 要素が、
+- `empty` - `true` の場合、余分の空の `option` HTML 要素が、
`select` の中のリストの先頭に追加されます。文字列の場合、
その文字列は空の要素として表示されます。デフォルトは `true` です。
-- `'default'` \| `value` - 2つのいずれかを使用して、 フィールドに表示されるデフォルト値を設定します。 フィールド名と一致する `$this->request->getData()` の値は、この値を上書きします。 デフォルトが指定されていない場合、 `time()` が使用されます。 - `'year', 'month', 'day', 'hour', 'minute', 'second', 'meridian'` -これらのオプションを使用すると、コントロール要素が生成されるかどうか制御できます。 これらのオプションを `false` にセットすることにより、特定の選択ピッカーの生成を 無効にすることができます (デフォルトでは、使用されたメソッドの中で描画されます) 。 さらに、各オプションでは、HTML 属性を指定した `select` 要素に渡すことができます。
+- `default` \| `value` - 2つのいずれかを使用して、 フィールドに表示されるデフォルト値を設定します。 フィールド名と一致する `$this->request->getData()` の値は、この値を上書きします。 デフォルトが指定されていない場合、 `time()` が使用されます。 - `'year', 'month', 'day', 'hour', 'minute', 'second', 'meridian'` -これらのオプションを使用すると、コントロール要素が生成されるかどうか制御できます。 これらのオプションを `false` にセットすることにより、特定の選択ピッカーの生成を 無効にすることができます (デフォルトでは、使用されたメソッドの中で描画されます) 。 さらに、各オプションでは、HTML 属性を指定した `select` 要素に渡すことができます。
+
+
#### 日付関連コントロールのオプション
これらのオプションは、日付関連のメソッド、つまり `year()` 、 `month()` 、
`day()` 、 `dateTime()` そして `date()` に関連しています。
-- `'monthNames'` - `false` の場合は、選択ピッカーの月の表示で
+- `monthNames` - `false` の場合は、選択ピッカーの月の表示で
テキストの代わりに2桁の数字が使用されます。配列をセットした場合
(例 `['01' => 'Jan', '02' => 'Feb', ...]`)、指定された配列が使用されます。
-- `'min'` - 年の select フィールドで使用される最小の年。
-- `'max'` - 年の select フィールドで使用される最大の年。
-- `'order'` - 年選択ピッカー内の年の値の順序。
+- `min` - 年の select フィールドで使用される最小の年。
+- `max` - 年の select フィールドで使用される最大の年。
+- `order` - 年選択ピッカー内の年の値の順序。
利用可能な値は `'asc'` と `'desc'` 。デフォルトは `'desc'` です。
-- `'year', 'month', 'day'` - これらのオプションを使用すると、コントロール要素が生成されるかどうか制御できます。
+- `year, month, day` - これらのオプションを使用すると、コントロール要素が生成されるかどうか制御できます。
これらのオプションを `false` にセットすることにより、特定の選択ピッカーの生成を
無効にすることができます (デフォルトでは、使用されたメソッドの中で描画されます) 。
さらに、各オプションでは、HTML 属性を指定した `select` 要素に渡すことができます。
+
+
#### 時刻関連コントロールのオプション
これらのオプションは、時刻関連のメソッド、 `hour()` 、 `minute()` 、
`second()` 、 `dateTime()` そして `time()` に関連しています。
-- `'interval'` - 分選択ピッカーの `option` 要素の中に表示される分の値の間隔。
+- `interval` - 分選択ピッカーの `option` 要素の中に表示される分の値の間隔。
デフォルトは 1 です。
-- `'round'` - 値が一定の間隔にきちんと収まらないときに、いずれかの方向に丸めるようにしたい場合は、
+- `round` - 値が一定の間隔にきちんと収まらないときに、いずれかの方向に丸めるようにしたい場合は、
`up` または `down` に設定します。デフォルトは `null` です。
- `timeFormat` - `dateTime()` と `time()` に適用されます。
選択ピッカーで使用する時刻の書式は、 `12` または `24` のいずれかです。
@@ -1603,7 +1619,7 @@ $this->request->data['submittedfile']
あなた次第です。デフォルトは 24 です。
- `second` - `dateTime()` と `time()` に適用されます。
秒を有効にするために `true` に設定します。デフォルトは `false` です。
-- `'hour', 'minute', 'second', 'meridian'` - これらのオプションを使用すると、コントロール要素が生成されるかどうか制御できます。
+- `hour, minute, second, meridian` - これらのオプションを使用すると、コントロール要素が生成されるかどうか制御できます。
これらのオプションを `false` にセットすることにより、特定の選択ピッカーの生成を
無効にすることができます (デフォルトでは、使用されたメソッドの中で描画されます) 。
さらに、各オプションでは、HTML 属性を指定した `select` 要素に渡すことができます。
@@ -1868,6 +1884,8 @@ echo $this->Form->minute('arrival', [
```
+
+
## ラベルの作成
`method` Cake\\View\\Helper\\FormHelper::**label**(string $fieldName, string $text, array $options)
@@ -2054,9 +2072,9 @@ notBlank バリデーションメッセージに対するエラーメッセー
**Submit のオプション**
-- `'type'` - リセットボタンを生成するためにこのオプションに `'reset'` を設定します。
+- `type` - リセットボタンを生成するためにこのオプションに `'reset'` を設定します。
デフォルトは `'submit'` です。
-- `'templateVars'` - input 要素や、そのコンテナーにテンプレート変数を追加するために、
+- `templateVars` - input 要素や、そのコンテナーにテンプレート変数を追加するために、
この配列を設定します。
- その他の指定された属性は `input` 要素に割り当てられます。
@@ -2100,17 +2118,17 @@ submit 入力は、基本的なテキストやイメージが必要な場合に
**ボタンのオプション**
-- `'type'` - これを設定すると、次の3つの button タイプのどれかが出力されます。
+- `type` - これを設定すると、次の3つの button タイプのどれかが出力されます。
1. `'submit'` - `$this->Form->submit()` と同様に送信ボタンを作成します。
しかしながら、 `submit()` のように `div` の囲い込みは生成しません。
これがデフォルトのタイプです。
2. `'reset'` - フォームのリセットボタンを作成します。
3. `'button'` - 標準の押しボタンを作成します。
-- `'escapeTitle'` - ブール値。 `true` をセットした場合、
+- `escapeTitle` - ブール値。 `true` をセットした場合、
`$title` で指定された値を HTML エンコードします。デフォルトは `true` です。
-- `'escape'` - ブール値。 `true` に設定すると、
+- `escape` - ブール値。 `true` に設定すると、
ボタンに対して生成されたすべてのHTML属性をHTMLエンコードします。 デフォルトは `true` です。
-- `'confirm'` - クリック時に表示される確認メッセージ。デフォルトは `null` です。
+- `confirm` - クリック時に表示される確認メッセージ。デフォルトは `null` です。
例:
@@ -2199,10 +2217,10 @@ echo $this->Form->end(['data-type' => 'hidden']);
**POST ボタンのオプション**
-- `'data'` - hidden 入力に渡すキーと値の配列。
-- `'method'` - 使用するリクエスト方法。例えば、 `'delete'` をセットすると、
+- `data` - hidden 入力に渡すキーと値の配列。
+- `method` - 使用するリクエスト方法。例えば、 `'delete'` をセットすると、
HTTP/1.1 DELETE リクエストをシミュレートします。デフォルトは `'post'` です。
-- `'form'` - `FormHelper::create()` に渡す任意のオプションの配列。
+- `form` - `FormHelper::create()` に渡す任意のオプションの配列。
- また、 `postButton()` メソッドは、 `button()` メソッドで有効なオプションも受け付けます。
例:
@@ -2249,11 +2267,11 @@ HTML リンクを作成しますが、指定した方法 (デフォルトは POS
**POST リンクのオプション**
-- `'data'` - hidden 入力に渡すキーと値の配列。
-- `'method'` - 使用するリクエスト方法。例えば、 `'delete'` をセットすると、
+- `data` - hidden 入力に渡すキーと値の配列。
+- `method` - 使用するリクエスト方法。例えば、 `'delete'` をセットすると、
HTTP/1.1 DELETE リクエストをシミュレートします。デフォルトは `'post'` です。
-- `'confirm'` - クリック時に表示される確認メッセージ。デフォルトは `null` です。
-- `'block'` - ビューブロック `'postLink'` へフォームの追加するために
+- `confirm` - クリック時に表示される確認メッセージ。デフォルトは `null` です。
+- `block` - ビューブロック `'postLink'` へフォームの追加するために
このオプションに `true` をセットしたり、カスタムブロック名を指定します。
デフォルトは `null` です。
- また、 `postLink` メソッドは、 `link()` メソッドの有効なオプションを受け付けます。
@@ -2491,6 +2509,8 @@ echo $this->Form->allControls(['password' => false]);
echo $this->Form->allInputs(['password' => false]);
```
+
+
## 関連データの入力を作成
関連するデータのフォームを作成するのは簡単で、エンティティーのデータ内のパスに密接に関連しています。