【发布时间】:2016-04-07 05:31:27
【问题描述】:
我想禁用选择输入中的选项,所以我尝试了:
echo $this->Form->select("status",
[
'options' => $status,
'value' => $order->status,
'label' => false,
'disabled' => [1, 2]
]);
但它不会在 html 代码中生成任何disabled 语句。
我的错误是什么?
【问题讨论】:
-
您应该仔细查看文档并检查
FormHelper::select()的正确签名。 api.cakephp.org/3.1/… | book.cakephp.org/3.0/en/views/helpers/… -
@ndm,嗯,抱歉,我混淆了
input()和select()语法。
标签: forms cakephp html-select disabled-input cakephp-3.1