JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" id="1" class="btn" onclick="reply_click(this)" data-product-name="Soap">info</a>
<form>
<input type="text" id="product_name" />
</form>
<script type="text/javascript">
function reply_click(element)
{
document.getElementById('product_name').value = element.getAttribute('data-product-name');
}
</script>