This data on console $(this).serialize()
gives me the result below, I wanted to submit it on load not on click and pass a select default value programatically(currency_code) -- the form is a built in library
_method=PUT&source=geolocation_recommendation&return_to=%2F¤cy_code=PHP
This is my code on click
$(document).ready(function () {
$(document).on("submit", "form.locale-bar__form", function (e) {
e.preventDefault();
let data = $(this).serialize()
console.log('>>>>', data)
});
});
Form looks like this
question from:https://stackoverflow.com/questions/66060310/submit-form-with-data-on-load