Skip to content

set value text

mmx edited this page Jan 2, 2019 · 1 revision

You can set the value displayed in a text field directly by using :value_text option.

# view

= simple_form_for ...
  ...
  = f.input_field :category, :as => :autocomplete, 
    :source_query => autocomplete_category_name_categories_path, 
    :value_text => "your value"

Clone this wiki locally