【问题标题】:Read only input in CakePHP 3.5CakePHP 3.5 中的只读输入
【发布时间】:2018-02-15 22:57:29
【问题描述】:

如何在 cakephp 3.5 中将输入框和日期时间选择器设为只读?我尝试使用只读和可编辑的,但它不起作用。

【问题讨论】:

  • 欢迎来到 StackOverflow。我们在这里为您提供帮助,但您需要尽自己的一份力量。你需要证明你已经付出了一些努力。您还需要提供代码和minimal verifiable example
  • 使用禁用而不是只读
  • 我用过,但它不会传递数据

标签: cakephp-3.0 cakephp-3.x


【解决方案1】:

使用readonly 属性,如下所示 -

echo $this->Form->input("name",array('readonly' => 'readonly'));

【讨论】:

    猜你喜欢
    • 2018-11-11
    • 2013-05-20
    • 1970-01-01
    • 1970-01-01
    • 2018-08-23
    • 2012-03-21
    • 1970-01-01
    • 2021-11-23
    • 1970-01-01
    相关资源
    最近更新 更多