Page 1 of 1

Use subform field in button on subform

PostPosted: Fri Jan 04, 2019 5:08 pm
by hf2094
Hello,
I want to use a subform field #Position# (input-text; editable) as URL for a button on the subform:

nubuilder1.png
nubuilder1.png (56.34 KiB) Viewed 265 times


The button is defined as INPUT-BUTTON with Custom code

nuBuilder2.png
nuBuilder2.png (23.93 KiB) Viewed 265 times


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

PostPosted: Fri Jan 04, 2019 6:19 pm
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

PostPosted: Fri Jan 04, 2019 6:50 pm
by hf2094
@kev1n,
solution works perfectly. Thank you.
yours, Hf2094

Re: Use subform field in button on subform

PostPosted: Mon Jan 07, 2019 5:01 am
by admin
.