Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a list that tracks compliance information. There are two required fields (Evidence and Comments); however, there's no way for the user to know what should go in these fields until they have completed the task. I don't want the user to put "dummy" information in the field when they first create the task (which would usually be before they complete the task), because then when they update the task, they may forget or ignore completing the fields.

Any suggestions?

share|improve this question
    
Can you provide your user's with example data for the two fields, in advance? What is the list used for? Is it a log of events that occurred in the past or a list of tasks to be completed in the future? –  Phil Greer Apr 29 at 14:57
add comment

1 Answer 1

up vote 1 down vote accepted

For achieving this you will have to cheat SharePoint OOB forms using jQuery (or javascript).

  1. Add the fields in your list and mark them non-mendatory.
  2. Update the NewForm.aspx to include a jQuery script to hide the non-mandatory fields. .
  3. Update the EditForm.aspx page to include another jQuery script that will check your field values and have custom logic for making the fields as mandatory.

Some References:

share|improve this answer
    
Agreed - Sudhir beat me to it. The way to do this is add scripts to the default forms. The fields won't be required as far as SharePoint is concerned (at the list column level) but the form itself won't submit if the fields are left empty. And don't forget to add some sort of visual indicator or error description when that happens. –  Omegacron Apr 29 at 17:08
    
+1 to @Omegacron make sure in the Edit form you include some indicator for form validation. –  Sudhir Kesharwani Apr 29 at 17:41
    
@wilson mark it as answer if it helped you. –  Sudhir Kesharwani Apr 29 at 17:42
    
Thank you! I will have to send this to our team and see if they can implement. –  Wilson Apr 29 at 19:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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