Saturday, June 26, 2010

Drop Down List Lost Drop List Data: Custom Forms in Sharepoint Designer

First of all, everything is stupid. That being said, I'm working on converting a set of FormFields in a Drop Down List (DVDropDownList) in a Custom List Form, and ran into the following problem:

Say a user makes selections in one of these custom drop-down lists, and then clicks OK, but the user is not allowed to continue (for example a validation error is found upon postback: a nonexistent user is given in a “people” field on the form)… in this case the drop-downs appear to remain selected but when the form is finally submitted, no data will be added to the list for these fields! The fields just end up lost, recorded as blank entries.

Furthermore, I discovered that any sort of postback preventing the user from moving forward causes the same problem.

The solution? Setting EnableViewState="false" on all of the Drop Down Lists seems to have done the trick. I'm not sure why it works, but maybe it has something do to with my alternate data source for the DDLs conflicting with the original field definitions in the list (which have no selections). Maybe I'll never know. Maybe I don't care.

No comments:

Post a Comment