LoginSignup
4
6

More than 5 years have passed since last update.

CakePHPのFormヘルパ、input labelのstyle変更方法

Posted at

label =>array('style'=>'color:red');みたいに 'style'=>''で指定すればいいんだろうなとおもったけどlabelタグで表示させたい文字の指定は?って思って調べたら 'text' =>'表示ラベル' で指定すればOKだった。

まとめると下記の様なコード

echo  $this->Form->input('Note.photo.remove', 
    array('
        type' => 'checkbox', 
        'label' => array(
            'text'=>'写真を削除する', 
            'style'=>'float:none'
        )
    )
);
4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6