Hi,
We have a dropdown/choice field on a basic form. We have passed a URL parameter to the page and in the Additional Settings of the Basic Form, we have added the following code.
var regType = '{{ request.params.evttype }}'; $("#dgccso_registrationtype").val(regType).change();
The code works and the correct value shows up on the form. When the form is submitted, the value that was assigned to the column is correctly updated on the record that is created.
But, we want to either hide this form field or make it read-only. But, when we do that, the column value is not updated in dataverse -
The first record is where we tried to disable the column on the UI by using the following JS -
$("#dgccso_registrationtype").attr("disabled","disabled");
We also tried making the column read-only on the dataverse form (not the portal basic form). Again, the column becomes blank even though we have predefaulted it via code.
We also tried removing the column from UI using JS and again after removing from UI, the field does not get update when the form is submitted but becomes blank instead.
$("#dgccso_registrationtype").remove()
What is the way to have the column read-only/hidden but yet updated on form submission?