1

I have a list, and want to insert custom javascript code in a new form for this list (when form loaded). For example, when new form for this list is opened, I want to make some layout modifications for this form.

How it can be done? And how many ways exist to achieve this?

Thanks.

Upd: I ask about SharePoint list, and SharePoint list forms, I suppose you look at the tags of the question :).

2
  • 2
    Could you re-read your question, and imagine that you know nothing about your question except what's actually written down here, and ask yourself: "does this question explain what I need?" Because, reading it, I have no idea what you're asking. Jul 28, 2011 at 15:04
  • The problem may simply be that I'm unfamiliar with sharepoint, so perhaps I didn't see the question due to my lack of knowledge. I do think that the edit has improved the question, though I still cannot, sadly, provide an answer to it. But thank you for editing and improving. I've just revoked my down-vote. Jul 28, 2011 at 16:16

3 Answers 3

2

You put tags for both SharePoint 2007 and 2010 and the methods are a bit different.

I agree with the previous post that with SP2010 you can simply use InfoPath designer for form design and do whatever you like to the look.

In SharePoint 2007, there are a couple ways incuding using SharePoint Designer, editing the form .aspx file, hiding the out of the box form and inserting a custom form which you will then be able to edit. You can also add in JavaScript code there as well.

My preferred method if you are just making some visual modifications is always JQuery which you can add in to a content editor and you can look for the particular tags surrounding rows or columns and attach to them and make your changes.

I think your question and tags need further clarification to get an articulate answer from anyone that will actually help you.

1

You can edit the layout using InfoPath 2010 like described here:

http://office.microsoft.com/en-us/sharepoint-designer-help/edit-list-forms-using-infopath-2010-in-sharepoint-designer-HA101631624.aspx

If you've got the SP2010 Foundation or SP2007 version, you can create custom list forms using SP Designer which gives you the option to do whatever you like since those are .aspx files.

http://office.microsoft.com/en-us/sharepoint-designer-help/create-a-custom-list-form-HA010119111.aspx

0

You can also edit the aspx List form in SP designer. To add Javascript or jQuery you should create a form for New in PS design then edit in Advanced mode to insert your Javascript in the proper place. There are many tutorials on the Web that talk about this... Also, you can add content editor webparts to the new aspx page where you can insert your Javascript or jQuery.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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