0

I've to customize edit and new form for a list. I started to create an empty project SP containing an application page. On featureactivated i set new url for edit and new for on the list.

I could keep standard form but i need to add javascript operation on save button and add some controls. I've to put an splongoperation too because in event receiver it's not allowed. In some tutorials they copy content form from SharePoint Designer and paste in application page.

Do you have a complete sample on how to do this?

0
  1. Adding new columns to the list would add the new controls required.
  2. Try looking into PreSaveAction() and PreSaveItem() javascript functions for you javascript needs.
  3. You can add javascript directly to the page using the designer or you can add a Content Editor web part and put code there. You could also place code in a separate js file and reference it in Content Editor web part.
  4. As for the long operation, can it be done in a timer job or a workflow? If not, try to do it in the event receiver. Since you are using SharePoint 2013, a WINDOWS scheduled task using CSOM is a definite possibility.
  5. Application pages are not the most practical choice. Once you deploy them, they are available everywhere under the _layouts folder. Try creating web parts if you must and embed them in default or newly created site page.
  • so create webpart would be better way?(do you have some sample?) I can't use event receiver because you don't have context for splongoperation. I've to enabled field in form depending on value of other fields. In splongoperation i've to create some word documents in an other library – user1898765 Aug 14 '15 at 17:51
  • Here is how you get the context sharepoint.stackexchange.com/questions/129502/…, How do you create documents? Workflow seems more suited for that – Arsalan Shahid Aug 14 '15 at 18:42
  • i've a library with word template. i do a copy to the destination library and set metadata depending on what you select in list. I hope that 'll be abble to use quickpart.I know splongoperation and i've to use it on save button in js like your sample – user1898765 Aug 14 '15 at 19:46

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.