Community
Discussions
Ideas
Community Blogs
Marketo User Groups (MUGs)
Support
Case Management
Knowledgebase
Product Documentation
Developer Portal
Training
Sign In
Phone Number Field Validation
Topic Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Printer Friendly Page
Anonymous
Not applicable
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
03-30-2015
11:30 AM
03-30-2015
11:30 AM
Phone Number Field Validation
Hi,
Does anyone know how to custom add a "+" in front of the phone field type?
For example, if someone enters "123-456-7891" - is there a way to populate it as "+1-123-456-7891"?
Thanks!
Christina
Labels:
Lead Management
Tags
(1)
Tags:
forms 2.0
All forum topics
Previous Topic
Next Topic
2 REPLIES
2
Josh_Hill13
Level 10 - Champion Alumni
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
03-30-2015
11:43 AM
03-30-2015
11:43 AM
Re: Phone Number Field Validation
A javascript would be needed. I'm sure github or a developer can help you do this.
SanfordWhiteman
Level 10 - Community Moderator
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
03-30-2015
12:28 PM
03-30-2015
12:28 PM
Re: Phone Number Field Validation
MktoForms2.loadForm( "//app-zz01.marketo.com", "AAA-BBB-CCC", 999, function(form){
form.onSubmit(function(form){
var enteredPhone = form.getValues().Phone;
if ( !/^\+/.test(enteredPhone) ) form.setValues({
Phone : '+'+enteredPhone
})
})
});