Page 1 of 1

Use subform field in button on subform

Posted: Fri Jan 04, 2019 8:38 am
by hf2094
Hello,
I want to use a subform field #Position# (input-text; editable) as URL for a button on the subform:
nubuilder1.png
The button is defined as INPUT-BUTTON with Custom code
nuBuilder2.png
Pressing the button results in a webpage "localhost/minadmin/#Position#" ?
Maybe this is already discussed in the forum, but I cant find it.

Thank you for your help.

Re: Use subform field in button on subform

Posted: Fri Jan 04, 2019 9:49 am
by kev1n
Use this Javascript:

Code: Select all

var p = $(this).attr('data-nu-form') + $(this).attr('data-nu-prefix').slice(-3) + 'Position'; window.open($('#'+p).val());

Re: Use subform field in button on subform

Posted: Fri Jan 04, 2019 10:20 am
by hf2094
@kev1n,
solution works perfectly. Thank you.
yours, Hf2094

Re: Use subform field in button on subform

Posted: Sun Jan 06, 2019 8:31 pm
by admin
.