Closed vikramktechhighway closed 6 years ago
concider using the pjax.submit method and adding your data to a field in the forum
$(document).on('submit', 'form[data-pjax]', (event) => {
$(selector).hide();
$.pjax.submit(event, selector)
});
@RichardTMiles Thank you
I want to post a form along with my custom object.
var myData = JSON.stringify(values); console.log(myData); $.pjax({ type: 'POST', url: url, container:'#' + pjax_id, data: myData, dataType: 'application/json' }); custom data is not posted along with formdata.