I have the following snippet out of one of my forms, I would like to modify the placeholder text, so that e.g. "Select assignee" will appear before typing a data in the field. I have changed the placeholder text and the prompt, but only the default text "Please select" is displayed. If I change the text in the placeholder for the "start_at" and "end_at", it does changes, but not e.g. for "all_day" or "office_in_charge" and "contact_person". Why doe the change work for one but not for the other. How can I modify it to what I want it to be ?
Thanks and regard, Dani
<div class="row form-group">
<div class="col-sm-3 field">
<%= form.text_field :start_at, {placeholder: :start_at, class: 'form-control date-field datetimepick', readonly: (!this_is_a_subevent) } %>
</div>
<div class="col-sm-3 field">
<%= form.text_field :end_at, {placeholder: :end_at, class: 'form-control date-field datetimepick', readonly: (!this_is_a_subevent) } %>
</div>
<div class="col-sm-1 form-check field">
<%= form.check_box :all_day, {placeholder: :all_day, class: 'form-check-input'} %>
<%= form.label :all_day, {class: 'form-check-label'} %>
</div>
<div class="col-sm-5">
<%
offices = Office.all.collect {|t| [t.display_name, t.id]}
%>
<%= form.label :assign_event_to %>
<%= form.select :office_in_charge, offices, {prompt: :office_in_charge}, {placeholder: :office_in_charge, class: 'form-control'} %>
<%
event_owners =
::CoreModels::PeopleAndCompanies::Person.all +
::CoreModels::PeopleAndCompanies::Company.all +
Office.all +
Department.all #+
#Team.all
%>
<%= form.label :contact_person %>
<%= form.collection_select :event_owner_gid, event_owners, :to_global_id, :to_s, {prompt: :event_owner}, {placeholder: :event_owner, class: 'form-control'} %>
</div>
</div>
Well I found how, just use, e.g.:
{:prompt => "Select contact person"}
e.g.:
<%= form.select :contact_person, person, {:prompt => "Select contact person"}, {class: 'form-control'} %>
This works.
Regards, Dani