I have a program that is creating some lists and adding the necessary fields to the lists in SPO.
I have marked some of these fields as Required
, but in list settings they do not show up as Required
. However when I try to create a record using the OOB form, it says these fields are mandatory.
How can I fix this?
Code for adding the field:
Field description = list.Fields.AddFieldAsXml("<Field DisplayName='Description' Type='Note' NumLines='6' Required='True'>", true, AddFieldOptions.DefaultValue);)
Also, is there a way to modify the OOB forms for these dynamic lists?
- I would like the default New form to not show some of the fields added.
- I also want to have a new form where I can edit only a single field
EDIT:
I now understand that if I set ShowInNewForm = 'FALSE'
the field will not show up in the new form