0

I have two "New item" forms, and I have been wondering, is it possible to make the some of the fields required in one form, and in the second form the same fields not required.

I tried to add required="TRUE" to the field which I want to be required but it wont work that way.

1 Answer 1

2

You can create two different ContentTypes

  <ContentType ID="CTA_ID" Name="ContentTypeA" Version="0" Overwrite="TRUE">
    <FieldRefs>
      <FieldRef ID="{Field_ID}" Name="MyField" Required="True"/>
    </FieldRefs>
  </ContentType>

  <ContentType ID="CTB_ID" Name="ContentTypeB" Version="0" Overwrite="TRUE">
    <FieldRefs>
      <FieldRef ID="{Field_ID}"  Name="MyField" Required="False"/>
    </FieldRefs>
  </ContentType>

Add to list and using for different new forms.

If it is not clear for you, please provide additional information about the problem (What is the new forms? Code samples? etc.)

Thanks

2
  • I have 2 "new labeled" forms and I want the same fields (with same name) to be required in one form and in the second form I dont need them to be required. So making new ContentType would help me?
    – Jori
    Nov 21, 2013 at 10:35
  • If you using OOTB(standard) new forms - new ContentType should solve your issue. Nov 21, 2013 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.