Hello,
I have a subform which contains a button. I want to use the button to start a procedure, which contains a Query to UPDATE a table. This works flawlessly with nuRunPHPHidden();
But I want to pass on some object values of the subforms objects. (The User should be able to coose a specific entry and press the button in this subform row to write the entry ID and his USER_ID (which already works) into another table.)
nuSetProperty() unfortunatly isnt working for mi inside a subform.
Best regards
marcus
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Passing information from an object inside a Subform to a procedure Topic is solved
-
- Posts: 20
- Joined: Mon Nov 29, 2021 10:16 am
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Passing information from an object inside a Subform to a procedure
Hi,
I tested it and it works for me as follows:
This JS is in an object's onchange event:
Output the parameter "test_param" in the Procedure:
I tested it and it works for me as follows:
This JS is in an object's onchange event:
Code: Select all
var id = event.target.id;
var entryId = nuSubformRowObject(id, 'entry_id').val(); // Get the value of the entry Id. Replace entry_id with your object id.
nuSetProperty('test_param', entryId);
nuRunPHPHidden('test', 0); // Run a Procedure "test"
Output the parameter "test_param" in the Procedure:
Code: Select all
nuDebug('#test_param#');
-
- Posts: 20
- Joined: Mon Nov 29, 2021 10:16 am
Re: Passing information from an object inside a Subform to a procedure
that works for me, thank you very much!