locked
add attachment column to copy of NewForm.aspx in sharepoint designer

    Question

  • Hi,

    I copy NewForm.aspx page in sharepoint designer, but I don’t have attachment column in Copy of NewForm.aspx. How I can add attachment (user can attach their files) in NewForm.aspx?

    Monday, December 27, 2010 9:58 AM

Answers

  • Hi,

     

    Thanks for your reply.

     

    Now I can reproduce the issue, but I don’t know why the toolbar is lost after doing these customization.

     

    For your scenario, I think you can try to create a custom list form (create custom list form), and then you can use SharePoint control “Form Action Button” instead of the default “Ok” button in the custom list form:

     

    1.    Open the new list form in SharePoint Designer;

    2.    Delete the “OK” button.

    3.    Insert a “Form Action Button” in the same place: In “Insert” menu > select “SharePoint Controls”> select “More SharePoint Controls”>select “Form Action Button”

    4.    There will has a “Form Actions” dialog box, select “Commit” and “Navigate to page “actions for this button> click “Navigate to page “ and click “settings”> set the page URL.

     

    Hope it helps.

     


    Xue-Mei Chang
    • Marked as answer by luckstar Tuesday, January 04, 2011 9:29 AM
    Thursday, December 30, 2010 8:09 AM

All replies

  • Hi LuckStar

     

    Go to List --?List settings-->Select Advanced Settings.Their you check you have "Attachments to list items are:" Enabled

     


    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development
    Monday, December 27, 2010 10:06 AM
  • Hi Destin,thanx for your reply,

    I said in sharepoint designer when i browse NewForm.aspx i cant attach file not in sharepoint list.

    anyway i check settings of my List, the option "Attachments to list items " are Enabled.

    How i can have attachment capability in copy of NewForm.aspx that created in sharepoint

    designer?

    Monday, December 27, 2010 10:26 AM
  • Hi,

    Check this site. Actually i am unable to open it in my company network so i don't know whether it is helpful or not.

     

    http://boardreader.com/thread/add_attachment_column_to_copy_of_NewForm_mzzr__01a 19d14-28fd-45df-949c-c6ad033d2d58.html

    Let me know if it works


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    Wednesday, December 29, 2010 5:05 AM
  •  

    Hi Hemendra,

    I am unable to open this URL too,I think the problem related that site not your company.

    anyother help?

     

     

    Wednesday, December 29, 2010 5:16 AM
  • Hi,

    I cannot reproduce your issue. How did you copy the NewForm.aspx page?

    After copying the page, there is Attach File button at the top of the form, so you can upload file to this list item. Or you can create a new custom list form for the list.

     

    Let me know the result.

     


    Xue-Mei Chang
    Wednesday, December 29, 2010 8:04 AM
  •  

    Hi Xue-Mei Chang,

    I don’t create new custom List.

    In sharepoint designer-> List Folder-> for example TestList

    Right click on NewForm.aspx, then Copy the NewForm.aspx and paste on this folder,

    Now in  “NewForm_copy(1).aspx” I don’t have attachment field,also the line between my fields will disappear. I add attachments column to field in NewForm_copy(1).aspx but it’s show if my list has attachment or not and don’t give me attachment capability that user can upload files.

    How I can have attachment capability in “NewForm_copy(1).aspx”?

    Wednesday, December 29, 2010 9:05 AM
  • Hi,

    I can offer only two things

    1. Check your permission, whether you have sufficient right to add file in list or not

    2. Copy all content of original newform.aspx page and paste them into Newform1.aspx.

    Hope it works


    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"
    Wednesday, December 29, 2010 11:44 AM
  • I tried the same thing but in my Newform.aspx page i am getting attachment option.Try with a different list
    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development
    Thursday, December 30, 2010 4:38 AM
  • Hi,

    I have done the same steps as yours, but I still cannot reproduce your issue, I have Attach File button in the NewForm_copy(1).aspx page.

    What are the version of your SharePoint production and SharePoint Designer?

    And please make sure “Enable attachments” is checked in the Settings of List Properties(right click your list folder in SPD>select Properties>Settings)


    Xue-Mei Chang
    Thursday, December 30, 2010 5:46 AM
  • Thanx Xue-Mei Chang,

    I explain my scenario to help you understand my problem.

    I want when user click on submit button, instead redirect to AllItem.aspx, redirect to .aspx page that show message for example “ your item successfully inserted”.

    First in SHD in my related list, right click on NewForm and copy it,then paste it on Folder list.

    Then in NewForm_copy(1).aspx in design mode double click onWebpartPages:ListFormWebpart and set Chrome State to Minimized. then in menu in top of SHD click on DataView-> Manage DataSources. In Data Source Library window right click on my related list and select “Show Data” then from “Insert Selected Fields as ..” dropdown I select “New Item Form”.

    Now I can see fields of my list except attachment field(attach file button).I select this way because I can write code for onclick event of my save button to redirect user to special .aspx page. Every thing it’s ok except I don’t have attach file button and the line between my fields are disappear. I’m very appreciated if anyone help me.

    Thanx alot.

    Thursday, December 30, 2010 7:23 AM
  • Hi,

     

    Thanks for your reply.

     

    Now I can reproduce the issue, but I don’t know why the toolbar is lost after doing these customization.

     

    For your scenario, I think you can try to create a custom list form (create custom list form), and then you can use SharePoint control “Form Action Button” instead of the default “Ok” button in the custom list form:

     

    1.    Open the new list form in SharePoint Designer;

    2.    Delete the “OK” button.

    3.    Insert a “Form Action Button” in the same place: In “Insert” menu > select “SharePoint Controls”> select “More SharePoint Controls”>select “Form Action Button”

    4.    There will has a “Form Actions” dialog box, select “Commit” and “Navigate to page “actions for this button> click “Navigate to page “ and click “settings”> set the page URL.

     

    Hope it helps.

     


    Xue-Mei Chang
    • Marked as answer by luckstar Tuesday, January 04, 2011 9:29 AM
    Thursday, December 30, 2010 8:09 AM
  • Thanx alot Xue-Mei Chang for your helpful answer,

    you really help me. J

     

    Tuesday, January 04, 2011 9:29 AM