Autofill an input depending on another input value

Hi everyone, let me explain my issue :
  • I have a form with 2 select inputs : One for the city and another one for the zipcode.
What i want is to autofill the zipcode input depending on the city input value.
I tried numerous things and i was only able to filter the zipcode input depending on the city input value but it doesn't autofill it.

I've tried to autofill using the "->default()" property but it was not working.

Thank you for your help
Capture_decran_du_2023-10-18_14-15-06.png
Was this page helpful?