How to modify wrapper div error class when using CakePHP with Bootstrap

前端 未结 7 1859
我寻月下人不归
我寻月下人不归 2021-02-08 13:47

I\'m using Bootstrap 3.0RC1 with CakePHP 2.3.6. Trying to take advantage of those beautiful looking classes like has-error and has-w

7条回答
  •  北荒
    北荒 (楼主)
    2021-02-08 14:36

    I have never used CakePHP, but I dare to post the answer here. I think the message element should be able to carry multiple classes like any other element does.

    So the simple edit is:

    'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-block has-error'))
    

    I see no reason to copy and paste the css code.

提交回复
热议问题