Skip to main content
March 17, 2016
Question

The number of characters

Phone number field is Input required.

But it would be sent with only three digits entered.

We need full length of the number.

How can I set the minimum number of characters?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Grégoire_Miche2
Level 10
March 17, 2016

Hi Kyoko,

You will have to use Javascript and the Form 2.0 client side API to get it done.

See http://developers.marketo.com/documentation/websites/forms-2-0/

-Greg

Translate
March 17, 2016

Thank you very much Greg

Let me ask you some more..

Seems like I need to add the line below.

form.vals({ "Phone":"555-555-1234", "Country":"USA"});

1. The minimum number is 10 and no hyphen. How can I describe?

2. "Phone"  should be same as the field name of the form, right?

3. Is "Country" necessary? If so,what it would be like?  For example,"japan" doesn't work.

Translate
Grégoire_Miche2
Level 10
March 17, 2016

Hi Kyoko,

I am not a JS developer, but basically, you should use a regex validation of phone number.

Yes, Marketo API will use field Names, not field labels.

-Greg

Translate