Friday, November 16, 2007

Custom New/Edit Pages

This is one that I ran into when I first started using sharepoint, but has recently come back.

A co-worker was trying to edit the new/Edit forms, and didn't want certain fields to show up on the form since they were used by some custom workflows/views.

So, how do you edit the forms? FrontPage of course!

Just edit the form, and delete the fields that you do not want to show up? NOPE! If you do this, the fields will end up blank, erasing any data in those fields when the user clicks save.

Instead, you have to edit the html. Find the tag for the row containing the field you do not want to show up, and add:
style="display: none;"


That way, you'll use CSS to hide the rows. They will still be there, but the user won't see them, and hopefully won't edit them. A perfect solution? Not really, but it'll work.

1 comment:

Jeff Lester said...

There are a few other ways to do this. You can hide fields, but this will hide them everywhere. This is a problem if you only want to hide them on the New form.