Can you use jQuery? If so,
1- You could change the type of your Send button to “button” instead of “submit”.
2- Detect the click, change the form’s action attribute and submit the form using the field value:
jQuery(“#BUTTON”).click(function(){
jQuery(‘#YOURFORM’).attr(‘action’, “https://domainname.com/user/”+jQuery(“.CODE”).val()).submit();
});