What is the HTML value for Boolean fields? | Community
Skip to main content
Joon_Park
New Participant
March 13, 2017
Solved

What is the HTML value for Boolean fields?

  • March 13, 2017
  • 1 reply
  • 3587 views

Hey Marketo Nation!

We have a HTML form (with our branding guidelines) that we submit via JavaScript using the Forms API.

We have two Fields we created called 'Relocation' and 'UScitizen' that are of type Boolean.

I add the values to the form using .addHiddenField() method of the Forms API, but I can't get to persist our Boolean Fields (Relocation and UScitizen).

What value do Boolean type Fields accept? We've tried "yes, no", "Yes, No", "true, false", "True, False", true, false (JavaScript boolean values instead of strings).

Thanks in advance!

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

Use JS strings "yes" and "no".

The method is .addHiddenFields btw (maybe that was just a typo).

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
March 13, 2017

Use JS strings "yes" and "no".

The method is .addHiddenFields btw (maybe that was just a typo).

Joon_Park
Joon_ParkAuthor
New Participant
March 13, 2017

I was sending the wrong keys (case-sensitive) ....thanks!