NetTalk Central

Author Topic: NetWebForm - Set Focus  (Read 5950 times)

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
NetWebForm - Set Focus
« 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
« Last Edit: January 12, 2020, 08:50:18 PM by Graham »

Vinnie

  • Full Member
  • ***
  • Posts: 183
    • View Profile
    • Email
Re: NetWebForm - Set Focus
« Reply #1 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebForm - Set Focus
« Reply #2 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

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: NetWebForm - Set Focus
« Reply #3 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

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: NetWebForm - Set Focus
« Reply #4 on: January 19, 2020, 06:00:15 AM »
Hi Bruce

Any thoughts on this..  attached pic is the effect i'm trying to achieve

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebForm - Set Focus
« Reply #5 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


Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: NetWebForm - Set Focus
« Reply #6 on: January 22, 2020, 08:41:01 PM »
Hi Bruce

Thanks for taking a look at this - can imagine it is non-trivial..

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetWebForm - Set Focus
« Reply #7 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

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: NetWebForm - Set Focus
« Reply #8 on: January 23, 2020, 07:14:15 AM »
When you good, you're good...  :)

Sure that will work, thank you