Welcome to the nuBuilder Forums!

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

Can rows in a subform be clickable (and redirect to)

Questions related to using nuBuilder Forte.
Post Reply
absalom
Posts: 25
Joined: Sat Apr 03, 2021 3:50 pm

Can rows in a subform be clickable (and redirect to)

Unread post by absalom »

With the help of answer in https://forums.nubuilder.cloud/viewtopic.php?f=19&t=10945 , I could display a subform in an edit form (idea being: seeing recent orders when editing a customer); subform being displayed as a "grid". Would it be easy to make the rows clickable and redirect to another form (based on order id)?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 447 times
Contact:

Re: Can rows in a subform be clickable (and redirect to)

Unread post by kev1n »

How about adding a Button in each row instead?

Similar to what is shown in the Objects Demo
(Select the tab Subform on the left)
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 447 times
Contact:

Re: Can rows in a subform be clickable (and redirect to)

Unread post by kev1n »

To make the rows clickable, you'd have to add click events to each field of the grid.

Code: Select all

$("[data-nu-form=YourSubformObjectID]").click(function(){ 
   var id = event.target.parentNode.id;
   var pk = $('#' + String(id)).attr('data-nu-primary-key');
   nuPopup('605f5c9cd9e8b68', pk, ''); // <-- replace 605f5c9cd9e8b68 with ID of your Orders Form.
});
Post Reply