Formatting entries into fields

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Formatting entries into fields

Post by marksmithhfx » Thu Jan 19, 2012 6:41 am

Hi, I'm just starting to develop a database in LC (using SQlite) and I have a few questions about LC field entries. Is there a library (or document) around that can help you do such things as validating the length of an entry, formatting an entry, etc? Here are a couple of examples:

In Canada a postal code has the form LNL NLN where L is a letter and N is a number. So, for example, my postal code is R3G 1C6. So, when getting postal code information in a field it would be nice if, as the user typed, it validated each character to make sure it was the correct type (beeps if not) and auto-inserts the space

Another typical example is a phone number field, where you have something like ( ) - perhaps in light grey in the background, and then as the user types the numeric digits (with the field only accepting numbers) it skips from location to location as you type

Dates are another example, where the background might show (in light gray) MM/DD/YYYY and the user can type numeric digits for month, day and year with the entry validating that month can only be 01-12, day can only be 01-31 etc.

Social insurance numbers, credit cards and the like also often have defined formats and ways of validating the input.

Is there a LC package of smart entry field validations and formats already floating around, or a discussion posted somewhere on how to do this?

Thanks, and apologies for the long post

-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Formatting entries into fields

Post by Klaus » Thu Jan 19, 2012 4:46 pm

Hi Mark,

hmm, not an easy task! 8)

Maybe this could be of interest for you:
http://droptools.sonsothunder.com/


Best

Klaus

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Formatting entries into fields

Post by marksmithhfx » Fri Jan 20, 2012 4:06 am

Klaus wrote:Hi Mark,

hmm, not an easy task! 8)

Maybe this could be of interest for you:
http://droptools.sonsothunder.com/
Klaus, thanks. Just what I needed to get started. I've installed droptools and it looks like there is a lot to explore.

-- Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply