Hi, I have a frontend form that consists of a bunch of fields, and I need to be able to set the value of the field with JS using a chrome add-on.
I managed to get the regular text/number fields working properly using $('#field_id').val(new_value);
, however I am having a hard time setting the value of the Taxonomy Advanced field and the WYSIWYG fields.
The Taxonomy Advanced field uses the Select2 library, and based on their docs, I should be able to set the field value using $('#field_id').val(value).trigger('change');
(for value i'm using the taxonomy ID) but it is not working for some reason.
Can you please give me some direction on how to complete this task?
Thank you!