Hi
I have a product subform on a quote that when the quote is accepted by the customer I want all objects except a few to be disabled so they can not be changed.
I have tried to disable the subform but the fields can still be changed. Have tried to make a copy of the form that is read only but it can still be changed.
Is there another way to disable the subform and it's contents?
Thanks
Paul
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.
Subform readonly
-
- nuBuilder Team
- Posts: 4299
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Subform readonly
Hi Paul
Based on this post:
Based on this post:
Code: Select all
function disableSubform(f, allowInsertions) {
$('[id ^=' + f + ']').prop("disabled", true);
if (allowInsertions) {
const r = nuPad3(nuSubformObject(f).rows.length - 1);
$('[id ^=' + f + r + ']').prop("disabled", false);
}
}
if (!nuIsNewRecord()) { // Disable if it's not a new record
disableSubform("YOUR_SUB_FORM_ID", false); // <------------- replace with your subform id
}