php - 请问用ActiveForm生成的input标签,怎么加上required属性?
ringa_lee
ringa_lee 2017-04-11 09:23:53
0
2
511

请问用ActiveForm生成的标签,怎么加上required属性和一段js代码?

ringa_lee
ringa_lee

ringa_lee

reply all (2)
PHPzhong

model rules 里面对应的字段加上 required

    阿神

    可以这样写 'required' => 'required', js的话,加class属性之后,再处理

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!