I need to get the values "trade" or "public" depending on which of these radio buttons is clicked:
<input name="customerType" type="radio" id="customerTypeTrade" class="filled-in valid" value="trade" required="">
<input name="customerType" type="radio" id="customerTypePublic" class="filled-in valid" value="public" checked="" required="">
Ive tried this but it returns 'undefined":
function() {
var radioName = "customerType";
var checked = {{Form Element}}.querySelector('[id="' + customerType + '"]:checked');
return checked ? checked.value : undefined;
}