Saturday, January 30, 2010

jQuery Forms Replacement In Sharepoint (Phase I)

In my intro post on this series, I tried to lay the ground work for my approach to replacing my forms with jQuery. I wanted to quickly discuss a few points about why I wanted to do this. I guess one of my main issues for the forms I have is maybe one of the no no's designers often speak of. Many of the forms in the tool that I am currently creating contains about 15 to 20 fields that a user has to fill in. The standard forms in SP render with a two column form that scrolls when the content gets too large. I hate scrolling! I really dislike it if I am filling out a form. This left me with a few choices to make that I would pose to the customer. Do they want a single form with all these fields or perhaps build a wizard-like form system that would break the form into smaller pieces so it could fit in a smaller space. I had also seen what the new SP 2010 forms looked like and thought they were better than before. They also popped up instead of redrawing the whole interface. This is what I want to achieve in this series. The customer was not picky about a single form or a series of smaller forms, and this was good because it leaves the options open a little more. So my first ideas were somewhat valid but then I had a few other ideas that I want to lay out to see what they might be able to do. 1: Create a custom form in an iframe contained in a hidden div. 2: Let Sharepoint create the form in an iframe contained in a hidden div. 3: Use jQuery's ajax functions to create the form and return the content to an iframe contained in a hidden div. 4: Use one of my earlier choices. I really had to think about this as to me it seems logical that I wanted to ensure that I could control everything and have some particular functionality that the customer wanted. WSS 3 does not support cascading dropdowns out of the box. I have seen some solutions that require setting up lists that the users use to support the drop downs. I did not have to do that on the .Net side so much as I was able to create cascading dropdowns in c sharp just fine. However, I really wanted to avoid as much of that as I could because in this version that requires postbacks which is what I want to avoid. Marc Andersons SPServices jQuery library I mentioned in the intro has a nice cascading dropdowns setup. I like this so I am going to see how it will work for the customer and which option it fits in best. So, my next phase I think is going to be to mix a few ideas together. I think that I will use SP Designer to draw the forms in a hidden frame and then use jQuery to provide the pieces that are needed to the user in a wizard like approach. This will hopefully allow me to use all of jQuery's tools and keep the choices available at one time to a minimum. I will let you know how this goes in a few days. If you have a better idea then please let me know!!

No comments:

Post a Comment