PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Convert form field text to Uppercase

  1. mrdon
    Member

    I am trying to figure out how I can convert a users input in specific fields, to be all uppercase.

    Any ideas would be greatly appreciated.

    Thanks,
    Brandon

    Posted 12 years ago on Friday October 7, 2011 | Permalink
  2. Once you convert it, what are you going to do with it?

    You will want to use the strtoupper PHP function before displaying it or saving it. If you can tell us what you're doing to do with the entered information, we can show you how to convert it beforehand.

    A link to your form with the field you want to work with will help as well. Thanks

    Posted 12 years ago on Saturday October 8, 2011 | Permalink
  3. mrdon
    Member

    Thanks Chris,

    The URL is http://tinyurl.com/3zaeyyw

    I figured out how to make the type in the form fields capitalize using css, but it doesn't save or send capitalized.

    Thx,
    Brandon

    Posted 12 years ago on Monday October 24, 2011 | Permalink
  4. Looks like you're just changing the display of the field with "text-transform: uppercase". That will take care of display, but the submission would be in whatever format the visitor submitted in. You probably want to do something like this in your theme's functions.php:

    http://pastebin.com/C3urFsx7

    I looked at your page and it looks like this is form ID 1, and also looked at the CSS you added to get the list of fields you want upper-cased. Please change either of those things as necessary.

    Posted 12 years ago on Tuesday October 25, 2011 | Permalink
  5. Sorry about the crazy tabs in that paste. Lost something in translation there.

    Posted 12 years ago on Tuesday October 25, 2011 | Permalink
  6. phaines@touchpointstrategies.n
    Member

    Is there a similar functions.php edit to force all input in my form to Titlecase?

    http://jeromepto.com/directory-2013/

    Posted 11 years ago on Monday April 8, 2013 | Permalink