<?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>Prevent any formatting on textbox</title><link>https://www.infopathdev.com:443/forums/thread/108110.aspx</link><pubDate>Wed, 28 Sep 2016 14:17:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:108110</guid><dc:creator>arkainus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/108110.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=108110</wfw:commentRss><description>I&amp;#39;m not sure if this is even possible, but I figured I&amp;#39;d ask and see if anyone has a solution for this.&lt;p&gt;I have a form, that I&amp;#39;ve hooked in via code to search an SQL Table for a product that we use on-site. This SQL table is from a vendor, so I cannot modify that structure without risk of breaking something in the program that utilizes it. The table I search has contacts in it, each contact has a primary key associated with it (in this case, dubbed &amp;quot;event_code&amp;quot;) Event_code is varchar(7), and they&amp;#39;ve utilized some sql triggers to increment a counter for each new contact that gets added. Their triggers prepend white space for event_code&amp;#39;s shorter than 7 characters (i.e. event_code 10883 is saved in the database as &amp;#39;  10883&amp;#39;. I&amp;#39;ve implemented the functionality so that each result gets populated into a repeating table. From there, they have an ability to check a box on that repeating table row, and I&amp;#39;ve implemented a button that will do some logic based on their selections, and copy info from the sql table into the form (and insert rows into a different database automatically). This works great if the event_code is exactly 7 characters, not so good on the older contacts from 20+ years ago that we still do business with that have the shorter codes.&lt;p&gt;The tricky thing is an infopath textbox field seems to strip leading whitespaces on the textbox once focus has been shifted from the field, so I can never get the value of the textbox to be &amp;#39;  10883&amp;#39;. Is there a way to prevent this? A way to keep the verbatim entry? My trusty google searches have so far turned up bupkis - results are mostly for people asking how to prevent whitespace in a textbox. I suppose I can implement in my code string.length checks, and prepend the white space manually based on the returned length, but I was just hoping there&amp;#39;s something super easy that I&amp;#39;ve missed. As always, any insight/help here would be greatly appreciated!</description></item></channel></rss>