Problem in parent-list after saving Related Item new entry
Hello,
we have a problem with a form containing a related item :
In the main form we set a field "readonly(true)" in javascript when the form is loaded.
When saving the form this field has to be set "readonly(false)" with onsubmit-event because otherwise the text in that field is deleted while saving .
When we use the related-item for creating a new entry in the second list this happens:
After saving and closing the reladed -item-form the main form is saved as well automatically, without the onsubmit-event detecting it. As consequence the readonly-field ist not set false and the entry in that field is deleted.
Is there a javascript-event we can use to fix this. It should detect the main form automatically saving when closing the related item and set the readonly-field false.
we have a problem with a form containing a related item :
In the main form we set a field "readonly(true)" in javascript when the form is loaded.
When saving the form this field has to be set "readonly(false)" with onsubmit-event because otherwise the text in that field is deleted while saving .
When we use the related-item for creating a new entry in the second list this happens:
After saving and closing the reladed -item-form the main form is saved as well automatically, without the onsubmit-event detecting it. As consequence the readonly-field ist not set false and the entry in that field is deleted.
Is there a javascript-event we can use to fix this. It should detect the main form automatically saving when closing the related item and set the readonly-field false.
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear UDRO,
Do you have any code on the child form? Can you share it with us? Maybe it can be used to set field as editable when the child form is opened, though it's hard to detect if it's closed without saving.
An easy fix might be to simply hide/show field, instead of making it readonly. It can still be editable, just not visible. And you can display its value as text in Text/HTML controls.
Do you have any code on the child form? Can you share it with us? Maybe it can be used to set field as editable when the child form is opened, though it's hard to detect if it's closed without saving.
An easy fix might be to simply hide/show field, instead of making it readonly. It can still be editable, just not visible. And you can display its value as text in Text/HTML controls.
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests