When a checkbox is unchecked webform will not add an element to the value key. As a result, Marketo receives a non-empty value (null is, for some reason, converted to a non-empty string).

In order to successfully get the right value into these custom fields in Marketo from checkboxes it would also be nice to call drupal_alter() so other modules get a chance to do something about the data before it's sent to Marketo.

A patch containing fixes for both of these things will follow.

CommentFileSizeAuthor
#1 2279591_1.patch983 bytessammys

Comments

sammys’s picture

StatusFileSize
new983 bytes

Here is the patch.

jyokum’s picture

Assigned: Unassigned » jyokum
jyokum’s picture

sammys, what is the datatype of the field you're mapping to on the Marketo side?

jyokum’s picture

Status: Active » Postponed (maintainer needs more info)

I created #2335897: Provide hooks to allow other modules opportunity to modify data to cover adding some hooks and I need some additional information to confirm what's happening with unselected checkboxes. So far I haven't been able to recreate anything that looks like a problem but if there is one I suspect it's related to field datatypes. Please let me know the datatype (text, decimal, boolean, etc.) of the Marketo field your checkbox is mapped to.

jyokum’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)