Tagged: title case
- April 14, 2011 at 12:34 pm #744
There are functions to convert fields to Uppercase, and Lowercase
Is there a simple way to convert a field to title case
For example if I enter martin smith into text input field how can i convert to Martin Smith
thanksApril 14, 2011 at 5:26 pm #5685
Dennis @ PerfectFormsBlocked
There is no function built for this behavior but you can do it with some gymnastics:
For your reference here is a list of the functions and how they work: /Documentation/manual/html/?functions.htm.
Use the Index Of function to find the position of the ” ” (space between names), put that number in a hidden helper field. Use Sub Text function to Place the characters starting at 0 and going to that number position in the helper into another hidden helper field. That is the First name. Use Sub Text function to take the first character of the first name and put it in a hidden helper. When that helper changes field data use the Uppercase function. Use the Sub Text function on the first name to remove the first letter. set your first name field with the value of the helper field with the first letter capitalized plus the first name field.
Repeat the process for the last name, starting from the character position where the space is to position 99 to get the whole last name allowing for many characters. There will be a space at the beginning so use the Trim function.
When the first and last names have capitals at the front you can set the field using the first name helper plus a space plus the last name helper.
You must be logged in to reply to this topic.