Support

Account

Home Forums Gutenberg Saving field updated via AJAX

Solved

Saving field updated via AJAX

  • Hello All,
    I have an ACF block with a couple text fields, several of which get populated via ajax. If I manually fill in all the required fields and let the ajax fields populate themselves I’m left with a perfect block full of input that I want to save. problem is when I click the update button and refresh my page the fields populated by ajax do not save. I’m assuming that I need to tell wordpress that these ajax fields need to be saved, but I have no idea what I need to do. any help would be appreciated. thanks!

  • adding .trigger("change"); seems to have solved the problem.

    final code:

    $(address_field).val(obj.address).trigger("change");

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Saving field updated via AJAX’ is closed to new replies.