Disallow spaces and special characters in a field - InfoPath Dev
in

InfoPath Dev

Disallow spaces and special characters in a field

Last post 11-01-2012 08:00 AM by Hilary Stoupa. 17 replies.
Page 2 of 2 (18 items) < Previous 1 2
Sort Posts: Previous Next
  • 07-17-2012 06:59 PM In reply to

    Re: Disallow spaces and special characters in a field

    Hi Hilary,

    I'd like to echo these sentiment. Very helpful to people like myself who have no idea how to use these custom patterns (and much more useful than the included patterns).

    So thanks a lot for posting this information.

    Danny

  • 11-01-2012 04:42 AM In reply to

    Re: Disallow spaces and special characters in a field

    I know that this is an old thread but thought it might be worth pointing out that you can use both Clayton's and Hilary's methods together. I wanted to allow my users to enter free, human-readable text in a field that gets used in the filename for browser-enabled forms in SharePoint. Spaces inflate the filename and special characters can interrupt the URL when you send links to the form by e-mail alerts so I needed a way to consume the user's entry and store it in a field with no spaces or special characters outside of hyphens, underscores and decimals that gets concatenated to a time stamp to form a filename. The answer was simple; the hidden field has a default value of: translate(../my:FieldName, "~!@#$%^&*()+=;'<>?,{}[]|\ ", "")
  • 11-01-2012 08:00 AM In reply to

    Re: Disallow spaces and special characters in a field

    Wow, perfect - thanks for contributing to the thread with this pattern!
    Hilary Stoupa

Page 2 of 2 (18 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.