pass radio button pick to url
A javascript question...
I've got a simple script that will pass my form value to the url in a thankyou page. It doesn't work with radio button fields. When I looked around for other suggestions, the suggestions seem to be using what I've already got. So, I thought maybe somebody here knows what to do - maybe something particular to Marketo.. or I just didn't look hard enough. My script, currently, which works with the other field types:
<script>
MktoForms2.whenReady(function (form) {
form.onSuccess(function(values, followUpUrl) {
var appendEmail = document.getElementsByName('miscInfoField1')[0].value
location.href = "go.website.com/pagename?choice=" + appendEmail;
return false;
});
});
</script>