Jump to content

Recommended Posts

Hello -

 

Is there a form validation rule within fusion pro, that will only allow numbers as the input to the field once imported to the Marcom template generator? If not, is there anyone who has had tackle this challenge?

 

I've searched extensively and attempted my writing my own rule with no luck.

 

Here's what I've got, and I've tried various variations of this.

 

var num = Field("zip");

var x = num.CharCode;

 

if (num == "" || x < 48 || x > 57) {

return false;

}else{

return num;

}

 

 

Thanks!

Link to comment
Share on other sites

Thank you, That worked exactly as I was hoping!

 

 

A related question.... do you know if there is a way to limit the characters on the actual input field to numbers or create an error related to that field before the template is actually rendered?

 

 

Thank you again!

Link to comment
Share on other sites

A related question.... do you know if there is a way to limit the characters on the actual input field to numbers or create an error related to that field before the template is actually rendered?

That would be a question for the MarcomCentral forum.

 

Some other systems, such as DSF, can use the field subtype, range, and data pattern defined in the HTML Form Definition (Web Collect) dialog for validation, but MarcomCentral doesn't use that, as far as I know.

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...