電話番号の文字数制限 | Community
Skip to main content
March 17, 2016
Question

電話番号の文字数制限

  • March 17, 2016
  • 1 reply
  • 3240 views

フォームの電話番号フィールドが入力必須なのに3ケタ入力しただけで

送信できてしまいます。

設定はフォームのフィールドの詳細で行うものですか?

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

1 reply

Josh_Hill13
Level 10
March 17, 2016

If you need 3 digits in the field, you can use field masking in the Form Setup, but it won't force it. You need javascript to enforce rules for this. Find a web developer.

March 18, 2016

HI Josh

Thank you for your help.

Other expert answered this question,but it didn't enough.

I don't need to have 3 digits, 

The probrem is that the phone field would be sent with the phone number which is incorrect,

even if the field is input required.

I found the code below and need to change the green colored part to put it in our embed code.

Would you help me?

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

1. The minimum number is 10 and no hyphen. How do you code?

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" didn't work. "ja" ? "JAPAN" ?

March 18, 2016

See Forms 2.0 » Marketo Developers​ example 3 and 7

I think your code

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

is not validation code.

i think Example 9 is your solution.