Return results to the same page

Hi, I’ve got a lookup field which returns a table of results on a separate page.
I’d like to return these results on the same page as the lookup text box. I’m not sure how to go about that? I know I need a partial or something , but don’t know what I need to do.

Any suggestions?

Thanks, Joe

Hi Joe.

I think you should have a look at the new Rails 7 Hotwire or StimulusReflex.



Something like this should get you there Autocomplete with Rails 7 (Hotwired turbo)

Unfortunately, we are using rails 6.

You can still use hotwire with 6, it’s mentioned in the installation section