JSFiddle - React, Tailwind, and code Playground
HTML
<a name="send1" id="send1" href="#signup">go 1</a>
<a name="send2" id="send2" href="#signup">go 2</a>
<a name="send3" id="send3" href="#signup">go 3</a>
<div id="signup">
<form action="send_form.php">
<input name="text" type="text">
<input name="hidden_field" id="hidden_field" type="hidden" />
<button type="submit">Send</button>
</form>
</div>
JavaScript
var the_anchor;
$('#signup').dialog({
autoOpen:false,
close: function(){
$(this).dialog('close');
}
});
$('a').click(function() {
the_anchor = $(this).attr('id');
$('#hidden_field').val(the_anchor);
$('#signup').dialog('open');
});