Page 1 of 1

Required, readonly field gets cleared after related items list form gets submitted.

Posted: 09 Jul 2014
by eedoh
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

Re: Required, readonly field gets cleared after related items list form gets submitted.

Posted: 10 Jul 2014
by Dmitry Kozlov
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:

Code: Select all

fd.onsubmit(function() {
  fd.field('Field1').readonly(false);
  fd.field('Field2').readonly(false);
  …
  return true;
});

Re: Required, readonly field gets cleared after related items list form gets submitted.

Posted: 23 Dec 2014
by sfernandez
does not work despite setear read only = false the field in the submit, another alternative?

Re: Required, readonly field gets cleared after related items list form gets submitted.

Posted: 24 Dec 2014
by Dmitry Kozlov
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.