Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

set focus on first field

Questions related to using nuBuilder Forte.
Post Reply
ARWEN
Posts: 78
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: 78
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: 78
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: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 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: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 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: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 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