I am afraid this is a beginner's question that should have been answered already, but either it is not or I cannot articulate myself correctly... Please bear with me, I hope this has a quick solution:
I want to populate my radio buttons of my form with variables. Later I want to get the values from my google spreadsheet, but I am stuck with the variables already.
<body>
<div>
<h4>Main Page</h4>
<fieldset style="background: #eceff9;"><legend style="padding: 10px;">Select Material</legend>
<label><input type="radio" name="matPick" id="mat1"></label><br>
<label><input type="radio" name="matPick" id="mat2" value="Material 2"> Material 2</label><br>
</fieldset>
</div>
(function() {
var mat1 = 'Material 1';
document.getElementById("mat1").innerHTML = mat1;
})();
I also created a fiddle.
I hope the code explains what I want to achieve, basically the html should show similar to Material 2, but created with my javascript variable.
Thanks very much for Your help! Martin