We had a form which was submitting the data to a page in a new tab. Like,
<form name='formOne' action='/action.cfm' method='post' target='_blank'>
<input type='hidden' name='employee' value='{"first_name": "test","last_name":"name"}' />
<input type='hidden' name='contact' value='{"phone": "1233214090","fax":"1098760982"}' />
<input type="submit" />
</form>
But now "action.cfm" page is expecting a JSON value in http request body. Like
{
"employee": {
"first_name": "test",
"last_name": "name"
},
"contact": {
"phone": "1233214090",
"fax": "1098760982"
}
}
Not sure how could we send the JSON data in http request body in form post in this case. Please suggest if it is possible to do so or if there is any other approach to achieve this.