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