Checkbox customization | Community
Skip to main content
Nikita_Nefedov
New Participant
August 22, 2018
Solved

Checkbox customization

  • August 22, 2018
  • 1 reply
  • 2087 views

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:

after:

Best answer by SanfordWhiteman

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.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
August 23, 2018

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.