1

What is the current way to create and design a form in SharePoint Designer 2013?

I have a list and there is the form for a new item start.aspx#/Lists/Listname/NewForm.aspx. In SharePoint Designer I have found the corresponding location for the page and the html content.

Now I could edit it inline. But I don't know if this is they way to go. What is best practice?

3

Editing Newform.aspx is not a Good Practice. Instead of editing default new form, Create a new form. This form will have all the code for each columns. You can add your CSS class to those columns for the Table and define your CSS for that class. Editing default form or default CSS is never considered as good practice.

How to Create a Custom New form

  • I've created a new aspx file and changed the code in each column. After that I've added css with the help of script editor. How do I add jQuery into the header of my new aspx? – Peter Jan 18 '16 at 15:43
  • In the "Main" Content Place holder or in "Head" Content Place holder you can add your JS reference and you can also add your JS under the <script> </script> Tags. – Akarsh Gupta Jan 18 '16 at 19:37
0

Editing the newform.apsx with SharePoint designer is certainly a good option. As SP Designer is not my favorite tool, I tend to user jQuery / javascript to show / hide fields or make other small changes to the form.

  • And what tool do you use to change your newform.aspx? You have to open it somehow. And currently the only tool to achieve that, which I know, is Sharepoint Designer. – Peter Jan 18 '16 at 11:05
  • 2
    Editing the default form is never be a best practice. You can create new form by clicking the new form button and selecting the appropriate form type . This action will give you the selective form. For customizing the form - you can add link to the style-sheet and Javascript file reference as well , which will contain you desired look and feel and functionality as well. And Finally you can make it as your default form . – user27178 Jan 18 '16 at 11:08
  • I don't. I just edit the page in the browser, add a content editor webpart and add my script to it. Either directly or through a file located in a document library. – Oak3 Jan 18 '16 at 11:08
  • @MartijnE Ok, I have uploaded a script into my document library but how do I include the file now in the head section of my new aspx file? – Peter Jan 18 '16 at 15:48
  • Go to the newform.aspx page, click edit page from and add a content editor webpart. In that content editor webpart you can add the html / js file as source. This adds the javascript in the body, not in the head. But for this purpose this should be fine. – Oak3 Jan 19 '16 at 21:11

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.