Is there any way to set the field as ReadOnly and still submit the value? As I know, if you set it as Disabled, the value won't be submitted when saving.
I tried add the following in my Add/Copy Page Startup Script and it also can't work:
$("#btn-action").on("click", function () {
$("#x_MYFIELD1").prop("disabled", false);
$("#x_MYFIELD2").prop("disabled", false);
});
To further explain:
I added the following in Add/Copy Page->Page_Load event. It does show correctly and the field was disabled:
$this->MYFIELD1>DefaultValue = "test";
$this->MYFIELD2>DefaultValue = "test2";
$this->MYFIELD1->Disabled = true;
$this->MYFIELD2->Disabled = true;
When I submit, it detected the value as missing as I set it as required field. I want the value to be submitted when I click the "Add" button.