Creation of 42 character exact Custom Field

STO555
Level 2

Creation of 42 character exact Custom Field

I was wondering if anybody knows of a way to create a string custom field but with limitations on the amount of characters to be 42. So when the person fills out the field they cannot enter less than or greater than 42 characters, it has to be exactly 42?

 

If one does not exist, does anybody know of a workaround that would accomplish the same task?

 

Thanks!

 

AH

2 REPLIES 2
Veronica_Holme4
Level 10 - Champion Alumni

Re: Creation of 42 character exact Custom Field

If what you mean by "when a person fills out the field" is through a Marketo form, that's where you will need to put the validation. You cannot put this validation on the custom field in Marketo itself. There's plenty of ways to build custom form validation through javascript.

SanfordWhiteman
Level 10 - Community Moderator

Re: Creation of 42 character exact Custom Field


I was wondering if anybody knows of a way to create a string custom field but with limitations on the amount of characters to be 42. So when the person fills out the field they cannot enter less than or greater than 42 characters, it has to be exactly 42?

Yes — assuming you're talking about the field on a form (not updating the field via the Marketo UI, or any other method). And it doesn't even take any JS!

 

Use a Pattern Mask:

 

2021-02-08 19_50_55-Lab # - Masks.png