0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

form_withで使用できるhtmlタグ

Posted at
form_forの書き方
<%= form_with model: @user do |f| %>
  <%= f.text_field :name %>
  <%= f.submit %>
<% end %>
メソッド名 機能
f.search_field 検索用ボックス
f.label ラベルタグをを生成Total cost
f.text_field 1行のテキストボックス
f.text_area 複数行のテキストボックス
f.email_field メールアドレス用ボックス
f.range_field 範囲選択バー
f.number_field 数値選択
f.select 選択ボックス
f.date_field 日付ボックス
f.datetime_field 日付時刻ボックス
f.datetime_local_field 日付時刻ボックス(ローカル)
f.month_field 月ボックス
f.time_field 時刻ボックス
f.week_field 週ボックス
f.telephone_field 電話番号用ボックス
f.file_field ファイル選択用ボックス
f.password_field パスワード用ボックス
f.hidden_field 隠しフィールド
f.check_box チェックボックス
f.radio_button ラジオボタン
f.url_field URL用ボックス
f.color_field 色選択ボックス
f.submit 提出用ボタン

Pikawaka

https://pikawaka.com/rails/form_with

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?