Hi all
I'm attempting to make some radio buttons in a form appear as separate images.
Has anyone attempted this?
Here is a working example [Edit fiddle - JSFiddle] , but unfortunately Marketo doesn't assign a class for each radio label (as far as I can tell).
Solved! Go to Solution.
Just add the classes yourself, as in MktoForms2 :: Radio Button Images
Nicholas Manojlovic Good morning from California. FYI. I moved your post to the Products and Support
Since it's a product related question, you might get an answer sooner.
Just add the classes yourself, as in MktoForms2 :: Radio Button Images
Thanks - I see!
Sweet. Here is how I managed to get a different class on each image:
MktoForms2.loadForm("//app-sj01.marketo.com", "410-XOR-673", 298,
function(form) {
var formEl = form.getFormElem()[0];
{
var radio = mktoRadio_1176_0,
label = radio.nextElementSibling;
radio.className += ' radio123';
label.className += ' label123';
var radio = mktoRadio_1176_1,
label = radio.nextElementSibling;
radio.className += ' radio223';
label.className += ' label223';
}
});
Thanks loads.
OK. That code looks very hard to maintain (string constants should be kept as separate as possible, and I would recommend using a lookup table of IDs and classes). But if it works for you...