Jump to content

Make a field only accept alpha characters no numbers?


jwhittaker

Recommended Posts

I have a template where our customer has a text field and they don't want the user to be able to enter any numbers. They want that field only to accept alpha characters only and warn them if they do enter a number. This is part of a template that will be on a Marcom store.

Thanks

If you want a warning to appear when the user is entering data into the form on the MarcomCentral store, such as a pop-up message in their web browser, before a composition is invoked in FusionPro, then this is a MarcomCentral question, which should be asked on the MarcomCentral forum.

 

If you want the preview composition to take place, and for the output to be shown in the web browser, then you can do something like put a text frame at the top layer on the first page of your template, and in it, insert a variable in large red text, to call out a rule that does something like this:

if (Field("Your Field Name".match(/\d/))
   return "Numbers are not allowed!"
//else
return "";

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...