Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Button to open edit form from SubForm
Button to open edit form from SubForm
Hi All, I'm trying to open an edit form from a grid subform from the record it's on.
If I hard code the PK, ContactID (16) into the Record ID for the run button it opens the target form correctly. However when using the ContactID or Record_ID hash cookie the form opens blank.
Could someone tell me what to put in the Record ID field to make this work? Thanks.You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Button to open edit form from SubForm
Instead of using a Run Object, use an Input Object and set its Type to Button. Add an onclick Event via its Custom Code Tab with the following Javascript.
In your form's Custom Code field, add this function:
Replace 5a29ddbd60e1aa9 with the ID of your Contact List form.
Code: Select all
openContactListForm(event);
Code: Select all
function openContactListForm(event) {
var et = $(event.target);
var contactID = $('#'+et.attr('data-nu-prefix') + 'ContactID').val();
nuPopup('5a29ddbd60e1aa9', contactID, '');
}
You do not have the required permissions to view the files attached to this post.
Re: Button to open edit form from SubForm
Now that I understand the difference between a zzzzsys_form_id and a sfo_code things work as they are supposed to thanks!!!