views:

1811

answers:

5

I have a custom list which has customized edit and new forms which were required by the user.

I then tried to add a new item to a folder (folders have the text of the year e.g. 2010) and when I click save on the customized new form it saves correctly but always to the root of the list.

I am wondering if there is a fix or a work around for this as it is highly annoying.

Alternatively can anyone recommend a way to implement a field which will auto calculate + 1 year from creation date, which might be a possible alternative however it will have to take into account the following.

Where the current year runs october to september.

Thanks for any help this has been driving me mad trying to find a solution.

A: 

Can't help much without knowing what you based the custom form on, but for a new form the folder to save to usually shows up in the query string.

Tom Clarkson
A: 

The form is a basic custom form list which I have then just modified parts to remove fields that are not required or need to be read only.

The original form worked perfectly and allowed items to be added to the list subfolders.

The new one has no additional code and is using the standard sharepoint DataFormWebPart to create the custom list form and so I have no back end code to insert the item etc, although I may have to resort to this...will I?

A: 

You need to be careful when modifying standard forms. I recommend you go back to a copy of the standard form and verify that that saves correctly. Remove the "unneeded" fields until it stops working.

Sometimes with this sort of customisation you need to use css rather than server side changes to modify the form so that the functionality remains in place after the component is hidden.

Tom Clarkson
A: 

It is definitely not an issue with the removal of fields as I created a new copy of the original and then changed it to a custom field saved it and tried to add an item.

It went straight into the root.

I tried the original form and it saves to the sub folder correctly.

A: 

Okay only work around I have for this at moment (I am currently in discussion with MS) is this.

http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx

I used the method getTagFromIdentifierAndTitle(tagName, identifier, title)

This returned the element I was after and then I basically went to the row dom node and deleted it.

I am hoping to have a nicer method but at least it is a work around for now.