I see how to use JS to get the value of a subform object. How could one set the value of a subform object?
I've got an invoice line item with tiered pricing. Right now if the users enters the quantity and selects an item and the correct pricing is retrieved and placed in the row. However if someone changes the quantity I need to see where this new value fits within the tiers and change the pricing on the row.
Also on the Wiki, the nuSetValue section shows the structure for nuGetValue.
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.
Set value of subform object
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Set value of subform object
Add an onchange event to the quantity field that updates the corresponding price value in the same row. In the provided example, '12345' is the current value set for the quantity field (the correct price must be retrieved somehow)
Code: Select all
nuSubformRowObject(event.target.id, 'your_prive_id').val('12345');