Solved

Required fields in edit form not allowing to submit the form

Posted on 2012-03-27
4
812 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 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