SOLVED

What is the HTML value for Boolean fields?

Go to solution
Joon_Park
Level 2

What is the HTML value for Boolean fields?

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!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: What is the HTML value for Boolean fields?

Use JS strings "yes" and "no".

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

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: What is the HTML value for Boolean fields?

Use JS strings "yes" and "no".

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

Joon_Park
Level 2

Re: What is the HTML value for Boolean fields?

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