Required, readonly field gets cleared after related items list form gets submitted.
I have two lists. Cost Records and Pricing. There's related items view for Pricing on Cost Record forms. Cost Records form has only one required field, and that's CR Number. This field is set to readonly through javascript framework (in edit form).
Every time I add new item into the related items view, or edit existing one, Cost Records form reloads, but it clears CR Number value as well (although this is edit form, so CR Number has already been saved into the list, it's not just issue of losing unsaved form data).
Any suggestions
Every time I add new item into the related items view, or edit existing one, Cost Records form reloads, but it clears CR Number value as well (although this is edit form, so CR Number has already been saved into the list, it's not just issue of losing unsaved form data).
Any suggestions
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
That is the browser restriction – it doesn’t pass values of disabled fields to the server. So you should enable fields right before the submission in onsubmit handler. Put the following code into JS-editor:
That is the browser restriction – it doesn’t pass values of disabled fields to the server. So you should enable fields right before the submission in onsubmit handler. Put the following code into JS-editor:
Code: Select all
fd.onsubmit(function() {
fd.field('Field1').readonly(false);
fd.field('Field2').readonly(false);
…
return true;
});
-
- Posts: 5
- Joined: Mon May 19, 2014
does not work despite setear read only = false the field in the submit, another alternative?
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Unfortunately, I coudn't reproduce the problem. Could you record a video that demonstrates the issue and share it? Please, include the browser's address bar into the video frame.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 11 guests