<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Only Numeric Characters Allowed</title><link>https://www.infopathdev.com:443/forums/thread/10557.aspx</link><pubDate>Thu, 19 Oct 2006 15:12:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10557</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10557.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10557</wfw:commentRss><description>Do I change this.......&lt;br /&gt;&lt;br /&gt;[InfoPathEventHandler(MatchPath="/my:CustomerAdmin/my:Customers/my:Customer/my:Contacts/my:Contact/my:Email", EventType=InfoPathEventType.OnBeforeChange)]&lt;br /&gt;public void Email_OnBeforeChange(DataDOMEvent e)&lt;br /&gt;</description></item><item><title>Re: Only Numeric Characters Allowed</title><link>https://www.infopathdev.com:443/forums/thread/10556.aspx</link><pubDate>Fri, 13 Oct 2006 19:08:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10556</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10556.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10556</wfw:commentRss><description>Hey Michael,&lt;br /&gt;&lt;br /&gt;I have seen you posting several duplicate topics as well as intermingling topics. Please try to keep the forum organized by refraining from these activities.  Below is a sample code snippet of this functionality in C#.NET:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;// The following function handler is created by Microsoft Office InfoPath. Do not&lt;br /&gt;// modify the type or number of arguments.&lt;br /&gt;[InfoPathEventHandler(MatchPath="/my:CustomerAdmin/my:Customers/my:Customer/my:Contacts/my:Contact/my:Email", EventType=InfoPathEventType.OnBeforeChange)]&lt;br /&gt;public void Email_OnBeforeChange(DataDOMEvent e)&lt;br /&gt;{&lt;br /&gt;	// Write your code here. Warning: ensure that the constraint you are enforcing is&lt;br /&gt;	// compatible with the default value you set for this XML node.&lt;br /&gt;	&lt;br /&gt;    string[] badStrings = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };&lt;br /&gt;    bool badNewValue = false;&lt;br /&gt;&lt;br /&gt;    for (int i = 0; i &amp;lt; badStrings.Length; i++)&lt;br /&gt;    {&lt;br /&gt;        if (e.NewValue.ToString().Contains(badStrings&lt;i&gt;))&lt;br /&gt;        {&lt;br /&gt;            badNewValue = true;&lt;br /&gt;            break;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if (badNewValue)&lt;br /&gt;    {&lt;br /&gt;        e.ReturnMessage = "You may not enter numeric characters in this field.";&lt;br /&gt;        e.ReturnStatus = false;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;}&lt;/pre&gt;</description></item><item><title>Re: Only Numeric Characters Allowed</title><link>https://www.infopathdev.com:443/forums/thread/10555.aspx</link><pubDate>Fri, 13 Oct 2006 17:30:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10555</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10555.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10555</wfw:commentRss><description>Matt,&lt;br /&gt;&lt;br /&gt;      I'm new at this. I need help with the OnBeforeChange event of the field. And to Check the NewValue to see if it has any numbers in it. Then I need to set it to the OldValue. Can you tell me how and give me some details. [EDIT: Removed issue discussed in seperate thread]&lt;br /&gt;&lt;br /&gt;Michael71&lt;br /&gt;</description></item><item><title>Re: Only Numeric Characters Allowed</title><link>https://www.infopathdev.com:443/forums/thread/10554.aspx</link><pubDate>Fri, 13 Oct 2006 16:39:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10554</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10554.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10554</wfw:commentRss><description>You should be able to do this with a custom data validation rule. It will still allow them to type the characters but will show red outline and a warning message when it happens.&lt;br /&gt;&lt;br /&gt;If you want to physically disable them from entering such characters you would need to use code in the OnBeforeChange event of the field. Check the NewValue to see if it has any numbers in it, if so, set it to the OldValue.&lt;br /&gt;&lt;br /&gt;I hope this helps, let us know if you need help with the details of either of these implementations.</description></item><item><title>Only Numeric Characters Allowed</title><link>https://www.infopathdev.com:443/forums/thread/5872.aspx</link><pubDate>Fri, 13 Oct 2006 14:55:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5872</guid><dc:creator>Michael71</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5872.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5872</wfw:commentRss><description>People,&lt;br /&gt;&lt;br /&gt;        How do I prevent a user from entering in anything else except Numeric Characters in the TEXT Box?? I don't even want them to be able to type Numeric Characters in the text box.&lt;br /&gt;&lt;br /&gt;Michael</description></item></channel></rss>