app/views/records/edit_fields/_location.html.erb
<%=
f.input :location,
as: :controlled_vocabulary,
placeholder: 'Search for a location',
input_html: {
class: 'form-control',
data: {
'autocomplete-url' => "/authorities/search/geonames",
'autocomplete' => 'location'
}
},
### Required for the ControlledVocabulary javascript:
wrapper_html: {
data: {
'autocomplete-url' => '/authorities/search/geonames',
'field-name' => 'location'
}
},
required: f.object.required?(:location)
%>