01fe20bec001
Joined 1/16/2023
01fe20bec001 said over 1 year ago on Autocomplete with StimulusJS :
hi dave,
thank you for the tutorial,
want a autocomplete input a value to a form without any relation
not able to figure it out, if you please suggest
below is my form partial
<%= simple_form_for [patient, patient_test], html: { class: "form patient-test" } do |f| %>
  <%= form_error_notification(patient_test) %>
  <%= f.input :testname, html5: true, input_html: { autofocus: true } %>
  <%= link_to "Cancel", patient_path(patient), class: "btn btn--light" %>
  <%= f.submit class: "btn btn--secondary" %>
<% end %>
want to get test list for testname form Test table which does not have any relation with patient or patient_test (only patient has many patient_test, patient_test belongs to patient )
thank you


01fe20bec001 said over 1 year ago on Autocomplete with StimulusJS :
hi dave,
sorry to bother you, but looks like I'm struggling to with autocomplete
I'm not able to figure out how to use autocomplete in place of select
i tried to do follow the complete tutorial, but I'm not able to figure out what i'm doing wrong
if you please help it would be just great, below is link to my repo,
https://github.com/mydbdiagram/sdrift
in the same i tries other autocomplete in books.index which works
please have a look
thank you so much

01fe20bec001 said over 1 year ago on Autocomplete with StimulusJS :
hi dave,
autocomplete in books index works fine, refereed this tutorial Search Autocomplete Stimulus https://dev.to/thomasvanholder/search-autocomplete-stimulus-560p,
not able to get books.new working, also ran yarn add stimulus-autocomplete, but still the same results
trying to attach screen shot but not able to
thank you