Solved

Required fields in edit form not allowing to submit the form

Posted on 2012-03-27
4
786 Views
Last Modified: 2012-06-21
I have a new form and edit form for one of the SP list.

In the new form there are only around 5 fields, however, in the edit form there are around 20 fields.

Now here is my problem, some of the fields in 'Edit form' are required fields. However, since they are required, when I tried to submit the form using 'New form' which doesn't contain those fields, I get errors stating that I can't submit forms because I don't have any values in those required fields.

I tried couple workarounds but couldn't get away with it. Has anyone solved this issue yet?

I would really appreciate all the suggestions and comments.
0
Comment
Question by:KoolAsIce
  • 2
4 Comments
 
LVL 18

Expert Comment

by:ivan_vagunin
ID: 37775213
Hi!
How do you hide these required fields on a new form? Do you have a custom forms? Which controls do you use to render fields?
Usually if a new form does not SharePoint:FormField controls for required field, then you can submit these form without any problem, because validators are inside these formfield controls.
0
 
LVL 5

Expert Comment

by:Robin Hall
ID: 37779115
KoolasIce,

The way that I have gotten around this issue, when using an InfoPath form submitting to a SharePoint list, is to rely on InfoPath, not SharePoint, to be in charge of making a field "required".  I deselect the "Required" option for the field in SharePoint and use InfoPath's Validation rules to make it happen.  I accomplish this by using conditional validation rules.

For example, I have 5 fields on view "New Form" and 10 fields on "Edit Form".  The "Status" field (the one I need to be required) only shows up on the "Edit Form".  In order to make it required I set up a Validation rule on the "Status" field.  The rule is if "Due Date" (also only found on the "Edit Form") is not blank, then the field is "Required".  I know "Due Date" will always be filled out by my staff which is why I use this field.

When Person X fills out the "New Form", the required field is turned off because "Due Date" is blank.  When Person Y fills out the "Edit Form", the required field gets turned on because he fills in 4/3/2012 for "Due Date" which makes the "Status" field required.  If Person Y tries to fill out the form without putting something in "Status", he will receive an error message and get shown a red asterix on what he needs to fix.

This way is useful, but only if you have a field that you know a user will always fill out.  It won't work as will if filling out the conditional field is not a mandatory step of the "Edit Form" view.  There are a lot of options under the 'conditions' for the validation rule so there are probably several way that you could set up a required field depending on how your form is created.
0
 

Accepted Solution

by:
KoolAsIce earned 0 total points
ID: 37779406
Here is the better solution that I have found:

Instead of using 'Submit' button of the ribbon, disable that submit button and create your custom submit button.

Now one can easily setup a rule for that button to be grayed out until all the required fields are filled so user cannot submit until he/she fill all the required fields. This workaround worked great for me!
0
 

Author Closing Comment

by:KoolAsIce
ID: 37795192
I have found the better solution in the mean time!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question