formhelper inputオプションのまとめ


formhelper inputオプションのまとめ


・inputのタイプを強制的に変換する
 $options[‘type’]

・メソッドの出力の中に、記述を挿入できる
 $options[‘before’]
 $options[‘between’]
 $options[‘separator’]
 $options[‘after’]

・select とラジオボタン定義を手動で行える
 $options[‘options’]

・selectでtrueをセットした場合、複数選択可能になる
 $options[‘multiple’]

・最大の文字列長を定義する
 $options[‘maxLength’]

・divタグの属性をセットできる、falseをセットするとdivが出力されなくなる
 $options[‘div’]

・inputタグにいつも付いてくるラベルに、その文字列が表示される
 $options[‘label’]

・デフォルトのモデルのエラーメッセージを上書きすることができる
 falseを指定するとエラーを出力しなくなる
 $options['error']

・textarea の入力項目で行と列の大きさを定義できる
 $options[‘rows’]
 $options[‘cols’]

・trueをセットするとタグの値を必ず空にします
 selectで文字列をセットした場合は空のオプションに文字列を指定できる
 $options[‘empty’]

・その他
 $options['legend']
 $options[‘id’]
 $options['default']
 $options[‘selected’]
 $options[‘timeFormat’]
 $options[‘dateFormat’]
 $options['minYear'], $options['maxYear']
 $options['interval']
 $options['class']