To no avail, I have tried to use jquery to show and hide fields based on the value of a calculated field. It works on NewForm, EditForm, but on DisplayForm. I used http://sharepointjavascript.wordpress.com/2012/01/19/dynamic-forms-for-sharepoint/

Real World Example: I'm working on a financial projects tracking site that has 50+ fields. To organize the UI better and make the forms more user-friendly, I tried to implement show and hide based on the difference of start and end dates of a project.

For instance, a project has start date May 2010 and end date of 2015. The difference of those two is 5. Thus jquery should show only 5 fields (out of 8 max): Award Amount Year 1, Award Amount Year 2 ... etc.

Though it doesn't have to be in conjunction with jquery,what other methods are out there to make SP list forms easier for end users? I would like to not show all the fields as it creates UI redundancy and confusion.

  • I've used jQuery on the DispForm. Could you post some example HTML and jQuery to give a better example. I might be able to lend a hand. – Robert Kaucher May 23 '12 at 19:48
  • I used the solution in the provided link. Did your jquery solution depend on other fields? – SP_Days May 23 '12 at 19:57
  • List form fields render as a table with a <tr> element for every field. JQuery is a good approach for hiding fields you don't want visible. Use the F12 developer tools to find the exact tr you want to change, then you'll need to do some jquery fiddling to find the best way to select that tr, and then call hide() in the ready() handler. You could try posting a screen shot of the row and its surroundings from F12 tools - that would help us get a handle on exactly what to call. – Derek Gusoff May 23 '12 at 20:10
  • Is F12 similar to Chrome Inspector? I guess my issue is around getting the value of a calculated field and showing x number of fields based on the passed value. I'll post the code shortly. – SP_Days May 23 '12 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.