0

Inside a form we have 2 select and would like to refresh/update the second select when the first select changes, using onChange

Example:

First select has:

onChange:"Turbo.visit(`/sites/index_by_country?country_id=${this.value}`)"

Currently this works, but Turbo.visit updates the URL also - which we don't want. We only want the frame to update (which it does) and not update the URL.

Or should we be using a different approach?

viktorsmari
  • 179
  • 1
  • 3
  • 12
  • Similar question here: https://stackoverflow.com/questions/71281610/load-a-turbo-frame-with-a-select-onchange-event – viktorsmari Apr 01 '22 at 09:08

0 Answers0