Is it possible to send data on button click via ajax and use value on form on same page?
I have several button each of which will have a data attribute with a different value, I need that value to be sent/used within a form that I have
UPDATE: I have added an answer below as well as mentioning it is possibly a duplicate.