Checkbox form fills & campaign triggers: How to differentiate between TRUE and NONE when there's no data change? | Community
Skip to main content
New Participant
November 23, 2021
Solved

Checkbox form fills & campaign triggers: How to differentiate between TRUE and NONE when there's no data change?

  • November 23, 2021
  • 1 reply
  • 3099 views

Hi there,

 

My challenge: I've got a form with a checkbox field F, and I want to timestamp each form submission where F is ticked. The challenge is to do so when F is already "True" in the database. That is because afaik neither a form submission with BLANK, nor one with TRUE will trigger a "Data Value Changed" event, and a smart campaign's smart list trigger can also not check for form field values. Therefore, it's currently either timestamping both (= submitted form trigger, and F is TRUE), or timestamping none.

 

Question: How would you tackle this efficiently? I.e., for a person with F being TRUE in the database, how would you trigger upon a form fill with F again being TRUE and NOT on form fills with F being BLANK?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman
You're mistaken about one part here. A Marketo Checkbox type field can never send a blank value. It always sends the string "yes" or the string "no". So while it's true that a blank value wouldn't update the database, a Checkbox can't generate such a value.

The other part of your question makes sense. I would use the code here: https://nation.marketo.com/t5/product-blogs/saving-the-last-form-post-all-fields-to-a-textarea/ba-p/316683

That will give a you a single field that always changes and contains the "yes" even of it was already "yes".

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
November 23, 2021
You're mistaken about one part here. A Marketo Checkbox type field can never send a blank value. It always sends the string "yes" or the string "no". So while it's true that a blank value wouldn't update the database, a Checkbox can't generate such a value.

The other part of your question makes sense. I would use the code here: https://nation.marketo.com/t5/product-blogs/saving-the-last-form-post-all-fields-to-a-textarea/ba-p/316683

That will give a you a single field that always changes and contains the "yes" even of it was already "yes".

lukeaAuthor
New Participant
November 23, 2021

Thanks for the prompt reply.

And... yes, sorry.. my bad: for different reasons, F is actually implemented as of type string - mimicking boolean behaviour, with the value set true, false... and blank. 

 

However, I guess this does not change the answer? Which means, it's not possible with Marketo out-of-the-box tools, but you would need to alter the JavaScript as well as the database (-> adding additional textarea fields), right? 

 

Thanks for the link to the code. Looks promising. 🙂

SanfordWhiteman
New Participant
November 23, 2021
Are you saying it's actually a single-line (type=text) input with validation to only allow the strings "true", "false", and ""? Got me wondering what would lead to that implementation. 🙂

Anyway, yes, you can still use the same code to write to a new Textarea field.