SOLVED

Re: Checkbox customization

Go to solution
Nikita_Nefedov
Level 1

Checkbox customization

Hi!

Have anyone tried to customize marketo instead default checkboxes using jquery plugins (for example this one​)? I'm not interested in using CSS, because it's not suitable for my design.

The sctructure of checkboxes changes after using such plugins and therefore Marketo doesn't collect information from checkboxes - it doesn't work.

structer before customization:

a2XlwqlH1gR5p2.jpg

after:

Vm6KNOKFDbwkP2.jpg

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Checkbox customization

It's not merely that "the structure of checkboxes changes" -- rearranging the original DOM elements in a Marketo form is largely harmless and we do do it all the time -- it's that this particular plugin completely removes the existing checkbox elements from the DOM and inserts new elements. That leaves the form in a partially-broken, partially-working state (and therefore broken in practice).

This plugin is clearly not designed to be integrated into an existing forms JS library. A Marketo-savvy JS developer would be necessary to make this work. There may be other libraries that don't require such work, as they're more sensitive to complex forms environments and don't expect a plain vanilla HTML form.

View solution in original post

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Checkbox customization

It's not merely that "the structure of checkboxes changes" -- rearranging the original DOM elements in a Marketo form is largely harmless and we do do it all the time -- it's that this particular plugin completely removes the existing checkbox elements from the DOM and inserts new elements. That leaves the form in a partially-broken, partially-working state (and therefore broken in practice).

This plugin is clearly not designed to be integrated into an existing forms JS library. A Marketo-savvy JS developer would be necessary to make this work. There may be other libraries that don't require such work, as they're more sensitive to complex forms environments and don't expect a plain vanilla HTML form.