Is there any possibility of sending a form (using any language) through email, the user enters the data in that email form and clicks on submits(fields and button is in the email) and the data is submitted to an endpoint API.
A Java-script function or something like that gets data from fields, and submits that data into an API.
tell me the steps on how to do it. I am able to send a form to the client but the javascript to get field data and append that to a URL isn't working.
Below is my sample email template code
<html>
<body>
<input type="text" id="comments" />
<br>
<div style="text-align:center" >
<button class="btn" onclick="submit()">Submit</button>
</div>
</body>
<script>
function submit(){
var owner = document.getElementById("comments").value;
var url = "http://hostname/API?owner="+ owner;
window.open(url)
}
</submit>
</html>
when I receive this email, the id and class are appended by a prefix of x_ and onclick of the button and the script tag is missing.
How to fix it or achieve something like this using any other approach?