Welcome to the nuBuilder Forums!

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

Use subform field in button on subform

Questions related to using nuBuilder Forte.
Post Reply
hf2094
Posts: 22
Joined: Wed Jan 07, 2015 7:11 pm
Been thanked: 2 times

Use subform field in button on subform

Unread post 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.
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 446 times
Contact:

Re: Use subform field in button on subform

Unread post 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());
hf2094
Posts: 22
Joined: Wed Jan 07, 2015 7:11 pm
Been thanked: 2 times

Re: Use subform field in button on subform

Unread post by hf2094 »

@kev1n,
solution works perfectly. Thank you.
yours, Hf2094
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Use subform field in button on subform

Unread post by admin »

.
Post Reply