Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

nuCurrentRow()

Questions related to installing, updating, setting up and configuring
Post Reply
vario
Posts: 131
Joined: Mon Dec 05, 2011 12:23 pm
nuBuilder Version: 4.5
Location: Newton Abbot, UK

nuCurrentRow()

Unread post by vario »

Using the latest version, I have a problem using nuCurrentRow() in an onchange event on a select object.
The value returned doesn't correspond to the row being changed.

For example, I have a subform with a text object and a select object. If I put "alert(nuCurrentRow());" as the onchange or onclick event then the text object event works as expected but the select object event just returns the value of the text event (does that make sense?)

I should add this used to work in previous versions.
kev1n
nuBuilder Team
Posts: 3979
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 5 times
Been thanked: 13 times
Contact:

Re: nuCurrentRow()

Unread post by kev1n »

Hi,

Try the following:

Replace

Code: Select all

function nuSelectOnFocus(e) {
	const $field = $(e.target);
	$field.attr('data-nu-org-value', $field.val());
}
with

Code: Select all

function nuSelectOnFocus(e) {
	const $field = $(e.target);
	$field.attr('data-nu-org-value', $field.val());
	nuLookupFocus(e);
}
in nuform.js and then log in again.
vario
Posts: 131
Joined: Mon Dec 05, 2011 12:23 pm
nuBuilder Version: 4.5
Location: Newton Abbot, UK

Re: nuCurrentRow()

Unread post by vario »

Good stuff - working as expected now. Thanks for the rapid response!
Post Reply