[Beginner] Disable tab from fld to fld until cond met

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

[Beginner] Disable tab from fld to fld until cond met

Post by shawnblc » Fri Jan 23, 2015 5:36 am

For the lack of the rights ... I'm trying to keep "focus" in a particular field until (disabling tabbing to the next field).

Example:

Right now a user can tab from fldA to fldB even if fldA doesn't contain something I want. I'd prefer them to enter something I want before being able to tab.

Can someone point me in the right direction?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: [Beginner] Disable tab from fld to fld until cond met

Post by Simon » Fri Jan 23, 2015 6:02 am

Hi Shawn,
Here you go;

Code: Select all

on tabKey
   if target is empty then exit tabKey
   pass tabKey
end tabKey
put that into the card script.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: [Beginner] Disable tab from fld to fld until cond met

Post by shawnblc » Fri Jan 23, 2015 6:06 am

Simon wrote:Hi Shawn,
Here you go;

Code: Select all

on tabKey
   if target is empty then exit tabKey
   pass tabKey
end tabKey
put that into the card script.

Simon

I was trying the following with no luck. Let me try your solution. Thanks Simon.

UPDATE: Definitely works. Thanks again.

UPDATE 2: Maybe I was a little quick on that. It's not working.

Code: Select all

set the autoTab of field "First Name" to true

Post Reply