NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Graham on January 12, 2020, 12:38:44 AM

Title: NetWebForm - Set Focus
Post by: Graham on January 12, 2020, 12:38:44 AM
Hi All

Have a NetWebForm with side by side fields, ie. 2 columns - some fields I would like to set the "tab order" vertically as opposed to left to right.

Have filled in the individual field "When accepted, Set Focus" options eg. 'cli:addr2'

Order still goes left to right - anything i'm missing?

Thanks
Graham

NT 11.28
Title: Re: NetWebForm - Set Focus
Post by: Vinnie on January 13, 2020, 02:59:54 AM
Niot Sure I understand 100% but I do use the Set Focus to move to next field but I do this in the embed point not the in the template.

Example.

! Start of "After Validate New Value, After sending replies"
! [Priority 5000]
p_web.SetValue('SelectField',clip(loc:formname) & '.' & p_web.NoColon('BoxBarcode'))

'BoxBarcode' is your CLI:Addr2
Title: Re: NetWebForm - Set Focus
Post by: Bruce on January 14, 2020, 12:35:27 AM
Hi Graham,

probably a good idea to make a small example app, or perhaps tweak one of the shipping apps, to show the effect you are seeing.
From there I can probably see what you (or I) are doing wrong.

cheers
Bruce
Title: Re: NetWebForm - Set Focus
Post by: Graham on January 14, 2020, 08:23:23 AM
Hi Bruce

Have tweaked the Form under General Tab in example BasicBrowseandForm - web1.app

When you tab off the Password field, I would like it to go to the field below ie. StartDate but it goes to the field on the right...

Hope that makes sense...

Thanks
Graham
Title: Re: NetWebForm - Set Focus
Post by: Graham on January 19, 2020, 06:00:15 AM
Hi Bruce

Any thoughts on this..  attached pic is the effect i'm trying to achieve
Title: Re: NetWebForm - Set Focus
Post by: Bruce on January 20, 2020, 09:55:58 PM
The example works, but only if you actually enter something for the password field. If you just tab over it, then it does nothing (which would be a problem).

I will need to add a property so that you can set the tabindex for each field, so the order is set at generate time. That's more complicated than it seems though, because I allow forms to be embedded in forms, and that will affect things...

I'll keep you posted.

cheers
Bruce

Title: Re: NetWebForm - Set Focus
Post by: Graham on January 22, 2020, 08:41:01 PM
Hi Bruce

Thanks for taking a look at this - can imagine it is non-trivial..
Title: Re: NetWebForm - Set Focus
Post by: Bruce on January 22, 2020, 11:27:17 PM
well, I've made a "trivial" tweak, in the sense of letting you set the TabIndex directly.
So ultimately (for now) if the programmer wants to change the tab order then they'll need to set it explicitly.

cheers
Bruce
Title: Re: NetWebForm - Set Focus
Post by: Graham on January 23, 2020, 07:14:15 AM
When you good, you're good...  :)

Sure that will work, thank you