Create a hidden field in JavaScript - Stack Overflow

PHOTO EMBED

Tue Mar 15 2022 10:38:31 GMT+0000 (Coordinated Universal Time)

Saved by @AndiKod #javascript

var input = document.createElement("input");

input.setAttribute("type", "hidden");

input.setAttribute("name", "name_you_want");

input.setAttribute("value", "value_you_want");

//append to form element that you want .
document.getElementById("chells").appendChild(input);
content_copyCOPY

https://stackoverflow.com/questions/1000795/create-a-hidden-field-in-javascript