Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

set focus on first field

Questions related to using nuBuilder Forte.
Post Reply
ARWEN
Posts: 79
Joined: Thu Nov 01, 2018 6:01 am

set focus on first field

Unread post by ARWEN »

Steven,

From nuform.js:

Code: Select all

	if(nuFormType() == 'edit' && nuIsNewRecord() && f.objects.length > 0){
		obj0.focus();
	}
Wouldn't it be useful to set the focus on the first field in any case, not just for new recrods? What do you think?
ARWEN
Posts: 79
Joined: Thu Nov 01, 2018 6:01 am

Re: set focus on first field

Unread post by ARWEN »

So, what do you think?
ARWEN
Posts: 79
Joined: Thu Nov 01, 2018 6:01 am

Re: set focus on first field

Unread post by ARWEN »

ARWEN wrote:So, what do you think?
Looks like questions aren't being answered anymore. I've solved it myself.
kev1n
nuBuilder Team
Posts: 4584
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 536 times
Contact:

Re: set focus on first field

Unread post by kev1n »

IMO, this is not trivial. You might not always want to focus the first field of a form. You might want to skip disabled/readonly fields or even buttons.
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: set focus on first field

Unread post by admin »

Everyone,

This is fixed in our next update.

Bit its still a couple of days away.

Steven
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: set focus on first field

Unread post by admin »

ARWEN,

This has been added to both the

standalone https://sourceforge.net/projects/nubuilder/

and

plugin https://wordpress.org/plugins/search/nubuilder/

versions of nuBuilder Forte.

Steven
Post Reply