If you are using a time field, you could use "7a" to get 07:00...
Well, I just did a quick check... it looks like you can use the "." character in place of ":" and InfoPath converts it correctly... so if I type in 7.15 it changes it to 7:15 for me. Cool!
Great question, Deb! It got me thinking and trying new things...
You're right, it's not required. You can also just create a rule on the
field to set its own value. The problem with doing this is that the rule will
run whenever the value changes, which is what you would be doing by setting
its value with a formula, so the rule will keep on running and keep on
changing the field until it cannot change it anymore. You can prevent this
recursive changing by adding a condition on the rule. I'll show you how to do
this in the solution I'm going to post this weekend and correct the other
solution I already had on my website.
The helperField is still good to use e.g. when you need an "outsider" field
to do processing on a repeating field that a repeating field cannot do itself.
Well, it works and I'm not complaining. ;-) I needed it for two telephone
fields so had to create two helper fields. The only catch is that if we trap
the \d{10} pattern, I don't know of a way to validate the user enters this.
I tried a validation that looked for \d{10} OR the combination that would
result in 999 999-9999 since that's what the logic is doing to the value --
anything else should be wrong. That didn't work, though, as it never let me
out of the error condition for some reason. Anyway, I thought the solution
was good from a user experience; i.e., the user can just type numbers and
they're automatically formatted, or they can format them theirself and their
formatting is left alone. Probably not a good solution where the format of
the data is important, but in my case it's not. I just wanted the user
experience to be easy.
Thanks for your brilliance! Will you be sure to re-post here when you have
the new solution so I can go study it? I'm relatively new to InfoPath and am
floundering in understanding functions, events, methods, XPath, ... <gulp>.