Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Required Fields not Working in Custom List Form

  Asked By: Jim    Date: Jul 30    Category: Sharepoint    Views: 3014

I am using sharepoint 2007. I have a list “Lista”. Content types are enabled, with the intent of using them to edit subsets of fields on various custom list forms. Content type CT1 uses the default EditForm.aspx form. All other content types (CT2, CT3, etc.) use highly customized list forms (each form is in four column format, with several sections, with instructions at the top of each section). When a user edits an item they see the content type pulldown at the top of EditForm.aspx. They select from this pulldown the form they wish to edit (like CT2), which brings up that form. A workflow sets the content type back to CT1 after each edit so that EditForm again appears if the item is re-edited. Each content type has fields that are required, and fields that are optional. Now for the problem - the custom edit forms do not recognize required fields – in other words in the content type definitions I indicate that certain fields are required – but, if they are left blank on the custom list form, the form saves – no message is generated on the form that required fields are required. Other anomalies/hints:

a)If I create an unmodified custom list form – no edits to the form at all, it behaves the same way – required fields may be left blank and the form saves. So I don’t think my reformatting of the custom list forms is the issue.

b)If I manually set an item in the list to a non-CT1 content type (first disable the “reset content type to CT1” workflow and set the content type manually in a list item using a datasheet view) it works fine. For example, if I set the content type for an item to CT2, then edit the item, the CT2 form comes up - and if I now fail to fill in the required fields, the form will not save – the “You must specify a value for this required message” message is displayed for the various required fields on the custom list form.

The basic column definitions for list Lista do not have any columns required – all required columns are specified as part of the various content types.

Any ideas on why required fields are not working for the case where EditForm.aspx is used to select the appropriate content type/form for editing?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Required Fields not Working in Custom List Form Or get search suggestion and latest updates.




Tagged: