Customize the "NewForm.aspx" page for a SharePoint List

Posted on 5/23/2007 @ 11:00 AM in #SharePoint by | Feedback | 69630 views

Creating a SharePoint list is hella easy. Point and click - and bingo - you have a form to type in and maintain your data in a structure you specified, and you can then create various views on the data collected.

But what if you wished to customize either the "New" form, or the "Update" form etc?

In this blogpost, I will demonstrate how to customize the New form for the announcements list.

  1. Create an announcements list on your favorite sharepoint site.
  2. Open that site in SharePoint designer.
  3. Go to the announcements list on the left side in the treeview, find the "NewForm.aspx", right click on it, and choose "New from Existing page".
  4. Save that new page at the same level as NewForm.aspx, call it "NewForm2.aspx". (I am only doing this, so if you screw up NewForm2.aspx - you still have NewForm.aspx intact).
  5. Next, find the "PlaceHolderMain" webpartzone. Go ahead and default this WebPartZone to it's default content as shown below -

  6. Next, using a similar smart tag, do "Create Custom Content" for "PlaceHolderMain".
  7. Next, with PlaceHolderMain selected, go to Insert --> SharePoint Controls --> Custom List Form. You will see a dialogbox like this --
  8. You know what to do .. Click OK :).
  9. Great, now you should see SPD reflect the form as follows -
  10. Great, now I'm going to customize this form an WYSIWYG way, and knock off the "Expires". This is real easy frankly, just select the Expires Row, right click, Delete Rows - POOF!
  11. Save the NewForm2.aspx.
  12. Now, right click on the Announcements list in SPD, choose Properties, and go to Supporting Files, click on "Browse" under the "New Item Form", and choose "NewForm2.aspx".
  13. Hit OK.
  14. Go back to the browser, and add a new announcement, you should no longer see the "Expires" field as shown below -

  15. Great, now send me a check for $25 for helping you out. :)

Adios.

Sound off but keep it civil:

Older comments..


On 5/23/2007 3:02:01 PM Rob Garrett said ..
Hmmm, this process looks similar to a customization I constructed when my client wanted to drop off a form field that was autopopulated after a user walloped the OK button. Hell I shoulda blogged about it an earned $25 ;)


On 5/23/2007 3:45:37 PM Sahil Malik said ..
Tell ya what Rob - if someone ever pays me $25, you get to keep $12.50! Fair deal? :)


On 5/24/2007 11:34:52 AM Beatriz said ..
Very very nice the solution! :)


On 5/30/2007 9:16:48 PM Aaron Weiker said ..
Your check is in the mail. :-)

I was actually just doing this today; go figure.


On 5/31/2007 6:10:42 AM Sahil Malik said ..
LOL Aaron, heard that before :)


On 6/4/2007 3:13:00 PM Britto said ..
Good tip. I have used this one before. You should point out the fact that the "Attach File" button will not work in the custom form. Try it out and it give you an error mentioning the fact that the form is custom or something like that. If you don't have to used attachments then disable it for the list and the custom form will work great.


On 6/4/2007 3:46:31 PM Sahil Malik said ..
Thanks for the tip Britto. :)


On 6/9/2007 7:26:00 AM Kapil said ..
Hi Sahil,


I saw your video on dnrtv.com, certainly sharepoint is a very good solution. But one question is in my mind, the question is about team site available in sharepoint 2007. when i assign a task to any person. then how he/she can submit report of that task to me, so that i can see all tasks with their related reports. like below. plz help me

task1


|


---> Report1


task2


|


---> Report2


Is there any out-of-box capability to do this, if no then how can i accomplish this. plz reply as soon as possible.


yours sincerely


Kapil


On 6/12/2007 9:49:51 AM Schou said ..
Great and how can I do the same but in the opposite way ?

I created a column (yes/no checkbox) and now want to include this new checkbox in my new form how do you do that ?


On 6/12/2007 12:01:45 PM Sahil Malik said ..
Schou,

The generated default content should already include it.

SM


On 7/13/2007 1:52:38 PM Ayub Patel said ..
How would you do in case of two dropdownlist getting data from sharepoint list. Example category and subcategory. On selection of category how do you show only subcategories of selected category in first dropdown.


On 7/17/2007 4:35:41 AM AtFirstSign said ..
i follow on manual, when i set Supporting Files is NewForm2.aspx. it doesn't work. how do i do? pls help.


On 7/17/2007 8:20:12 AM Nithya said ..
Hi,

In our project we have cutomized the DispForm.aspx form of some of the custom lists. It works very well in the development server. But when we export the site to another server (like staging server), and invoke a list item in that server, we encounter an Error and the customized page is not rendered.


We found what is causing this problem but we are not able to find a solution to it. The error is caused because the list in the exported site has its own GUID and the customized web part in the DispForm.aspx is still refering to the GUID (which is being used as the list name) that was created in the development server.


We are not able to find a resolution for this issue. Please help if anyone knows....

Thanks in advance.


Nithya.


On 7/24/2007 9:19:39 AM John Lancaster said ..

On 7/27/2007 6:08:17 AM Mala said ..
Hi,

Attach file button is not working. When I click on attach file button i get


"Error:This form was customized not working with attachment". Can u send the step for attachment.

Thanks in advance.


Mala


On 8/3/2007 7:44:57 PM Mandar said ..
Hi


When I try to insert--> Sharepoint Controls--> Custom List Form(following your example word to word) designer does not do anything. Page stays with empty content. Are there any additional settings that need to be done? I am running WSS 3.0 and trying to customize with Sharepoint Designer 2007.


If I try insert--> Sharepoint Controls--> List Form it works but that is of no use to me since I want to customize the list.

Any suggestion would be welcome.


On 8/15/2007 11:00:10 PM Castle said ..
Hello,

I'm having a similar issue to the previous entry. Except when I go to Insert > Sharepoint Controls > Custom List Form... the Custom List Form is grayed out.

I'm using Sharepoint Designer 2007 on SP2003.

Thanks in advance!


On 8/29/2007 11:04:58 AM Pete said ..
That's handy....but....What if.... say you wanted to give the user the option to select one of the field values based on data from another list ?

so in this example maybe Title could instead be a dropdown of announcement Types e.g. "News,For Sale,Random Stuff" held in a list. how would I do that ??

My attempts cause SPD to have a freak if you mess around with the default fields.

Thanks


Pete


On 9/6/2007 7:51:33 AM Dipti said ..
Hi..


How can I add events to server control button that I have added to a newform.aspx page? Also is it possible to populate a dropdown list from another custom list in this particular form? I need to fire selectedindexchange event for the dropdown list which would populate a list box. The requirement is basically to select a topic and then the respective categories for that topic should be populate in the list box. The user can then selected the categories and add the item.

Please let me know if this is achievable.

Thanks in advance


On 9/28/2007 12:42:26 AM Abeer said ..
Hi,


Thank you for the steps, all you said works but I then lose the connection between the list and the dispform.aspx page or the NewForm.aspx page! and when I go the properties and try to set them back, it won't save and I ave to recreate the list all over again! any ideas why this is happening?


Thank you,


Abeer


On 10/5/2007 6:44:35 AM Andy said ..
Thank you! Just what I needed! Does anyone know though how I can pre-populate a field with the current users login? I am editing the New Item form for the HelpDesk template and instead we want to have the current users login pre-filled in the Customer people picker field. Thanks!


On 10/29/2007 4:31:50 PM bebina said ..
how do in production environment?


On 10/31/2007 7:26:29 AM Mark H. said ..
Nice thingy! Thanks for you post.


But, have you ever tried it on a calendarlist? It's not working :(


When you try to use it, you get errors. It works on all other types of lists, but no calendar...

Can you help me, please? Thanks.


On 11/14/2007 3:38:14 PM Saurabh Aggarwal said ..
There is a drawback of customizing the new item form though. Customizing a newform or edit form for a list causes that form to not "see" changes one makes to the list, in other words if you add new columns to the list, the customized form will not get updated automatically and one needs to make make such changes to the form manually.


On 11/15/2007 7:08:28 AM Gabriel said ..
Hi,

Thank you for the post. Does anyone know how to populate a person/group field or any other field getting the value from an URL parameter?

Thanks.


On 11/29/2007 11:40:23 PM Andy said ..
Has anyone found a workaround for attaching files? Cause if you chance the form like this attachments stop working... which makes it useless for most of my applications unfortunately :oS


Great article though, just MS throwing rocks on the way!


On 12/3/2007 10:53:17 AM Tim said ..
Am having the same problem as Mandar anyone find a solution yet?

On 12/18/2007 10:37:04 AM farid dehar said ..
hola a todos

Escribo en castellano

-**** I Write en spanish ***-

para resolver el tema de adjuntar ficheros en un formulario personalizado lo he reglado de esta forma

1- tengo una lista con las seguientes columnas :


- Titulo incidencia


- Descripcion incidencia


- Tipo incidencia


- Technic assignado


- Dias de resolución


- Acciones realizadas

En el formulario de creacion NewForm.aspx necesito ver solo los campos

- Descripcion incidencia


- Tipo incidencia


en el formulario de edicion necesito esditar los campos :

- Technic assignado


- Dias de resolución


- Acciones realizadas

y visualizar los campos

- Titulo incidencia


- Descripcion incidencia


- Tipo incidencia

Los campos a ocultar en el NewForm le he puesto con la opcion " OCULTO"


de manera a tener en el formulario NewForm.aspx solo los campos que necesito

En el formulario EditForm.aspx he creado un formulario personalizado y he puesto el webpart " ListFormPart " en IsVisible=False <IsVisible>false</Isvisible>

y he selecionado el control < WebPartPages:DataFormWebPart con la opcion " IncludeHidden = True "

De esta manera en el NewForm.aspx me funciona el " Attach File " y muestro solo los campos que necesito

y en el EditForm.aspx muestro todo los campos


On 1/15/2008 8:23:55 AM Tim said ..
Thanks for the help.

Your $25 is on its way, I sent a check for $1000 for you to cash keep $25 and send the rest to my poor starving uncle in africa to help him escape.....


On 1/21/2008 11:58:45 AM Ram said ..
hi,

i would like to add my custom web part to the list definition and hide the default listview webpart that gets displayed in the DISPFORM.ASPX page.

How can i achieve the same using list definitions.

Ram


On 1/22/2008 1:19:43 AM Shalini said ..
Hi,

Is it possible to add a column where the name of the coumn should be the data entered into its previous column value.


For more clarification.


If suppose i have a column named "Name",so user enters value over there.Now,i would like to know as soon as the users enters the name into the textbox.The textbox value should appear as the next column in the next row.


On 2/21/2008 8:56:18 PM Scott said ..
On step 12 I keep changing it to my new file and hitting OK, but it keeps reverting back to the old file... what am I doing wrong???

Thanks for the step by step.


On 2/22/2008 1:21:25 PM scott said ..
OK.. this is very frustrating because I've retraced my steps 5 times now and this never works. I can customize the form but when I try to reassociate the NewForms2.aspx with the New form option through the Support Files Tab, the changes will not stick. I make the changes, hit apply, test my list and click New gives me a "Invalid Page URL:" error... every time. Please help.

By retracing my steps I'm actually deleting the list and starting over from scratch everytime - everytime same result.


On 2/22/2008 2:08:02 PM scott said ..
Finally figured it out... Following these steps results in deleting the ListFormWebPart... Something that I never actually selected and deleted the ListFormWebPart. Seems like you can't help but delete this. So I hid it instead (i.e. didn't follow any of the steps through 6).


On 2/26/2008 11:14:37 AM Kier Simmons said ..
THANK YOU, I've been looking every where for this and I've been getting nothing but overly complex ways to go about it in infopath.


On 2/26/2008 3:01:37 PM carla said ..
Scott, what do you mean you didn't follow any steps through 6? Did you start at step 7?


I am still trying to figure out if there is a way to return the functionality of the attachment after customizing the form? Any help would be greatly appreciated!


On 2/27/2008 11:41:26 AM Jan said ..
Hi,

does nobody have the problem attaching files? It´s not working after changing the Form. :-/


On 2/27/2008 3:40:38 PM Kevin Cornwell said ..
See my blog post for more information on this modification. In particular, read the gotchas...

http://www.mysharepointblog.com/post/2008/01/Create-a-custom-list-form-for-a-SharePoint-list.aspx


On 3/19/2008 5:35:24 PM Maarten said ..
Is there anyway to change the databinding on the built in listbox -> listbox field control to a custom pre-sorted datasource?

I noticed it was doable with dropdown and standalone listboxes but I'd prefer to use the built in control rather than rewriting the wheel.


On 3/26/2008 2:42:45 PM Michael Rose said ..
How do you account for SharePoint not recognizing the new customized form. If you are in designer and right click the list and take a look at supporting forms you will see that once you add a custom list form SharePoint will no longer maintain the url to that new form. I have read in other blogs that this is a bug and Microsoft needs to fix it. I created a new custom form and everytime I click new list item I get no url and my list is busted. I hope Microsoft takes care of this and adds a better dynamic today column.


On 4/2/2008 6:00:00 PM Michael said ..
Has anybody a solution for prepopulating fields in newform.aspx?


On 4/18/2008 6:09:00 AM Johannes said ..
Hi,

a lot of you have report that there is no reaction when inserting a "custom list form".


Has any of you already found a solution?

The strange thing for me is:


i first made some tests on a custom list which worked fine, but when going to insert this custom list form to my list, it won't do anything.


Whith any other list on the site it works - expect this one.

Could it be because of the number of fields? (its a really big list where i need to modify this)


Or is there any way to manually build this form? (without using the "insert" command?)

Jo


On 4/29/2008 10:44:12 AM Deena said ..
I also had trouble getting the properties selection for the newform2.aspx to stick. It kept reverting to newform.aspx. So, I renamed the original newform.aspx to newformoriginal.aspx and then I renamed the newform2.aspx to newform.aspx and everything worked fine. I basically still have my backup copy of the original and my new form working. The only thing is that I didn't test attachments and that seems to be an issue so I will try to test that. If anyone has a solution for the attachments, I'd really appreciate hearing about it. Thanks.


On 5/2/2008 9:06:57 AM Yonz said ..
Hi,

I had the same issue when changing the "supporting files". Make sure you set the "Content Type Specific Forms" field to "Item" not "Folder". then it works fine.


On 5/15/2008 10:03:35 AM Kandy said ..
Hey ppls...

Johannes, I am having the exact same problem (Insert custom list in SharePoint Designer and it does nothing)... I have tried uninstalling and re-installing; using a other pc, nothing thus far worked... The worst part is that it gives absolutely no error information!

Please guys, if you solve this - you surely are the MAN! (or WOMAN)!

KANDY!


On 5/19/2008 1:42:38 PM Jarrod said ..
Works great, one question now that I can see the drop downs is there any easy way to make them cascade? Parent Child type setup


On 6/7/2008 2:48:14 PM chris said ..
castle asked why the insert custom list form option is grayed out, mine's the same, doesn't seem to matter where i am on the page it is never active, does anyone have an answer for this please.


On 6/24/2008 5:34:19 AM Angel said ..
I have another one...


I make it work with another newform.aspx, but when going by mobile views with "/m" option...I can not see the "New Item" link, in the list...so I can not ceate new items with mobile....with PC views there is no problem.


Any clue what happens with mobile views when creating a customized "newform.aspx" ????


On 6/29/2008 6:50:03 AM Suhaib said ..
hi guys


how to make the OK button add to list without going to allitems.aspx page


coz i dont wont the customer see all data like the administrator

please help

thanks


On 7/9/2008 10:20:35 AM yzzuF said ..
The only thing i had trouble with was that i was trying to do this with a custom list.

If your creating a custom list, when in the "supporting files section.


If you dont change Folder to Item, the changes you made will not stick.


On 7/11/2008 8:26:38 PM Shawn said ..
Chris and Castle...it seems that a step was skipped. You must also select the "PlaceHolderMain(Master)" object, click on it's "right arrow" menu and select "Create Custom Content" to enable, umm, custom content ;)


On 7/14/2008 4:08:23 PM Lisa said ..
Great info....just what I was looking for today! I have several calculated fields in a list and needed to hide two of them from the Display view...lo and behold...no calculated fields display when follow the steps to create custom content....

Can you help pease? :) Thanks!


On 7/21/2008 12:42:49 PM Snehal H.Rana said ..
Hi Suhaib,

I am looking for the same solution. I want my "OK" button to be redirected to a different confirmation page.

Does anyone has any tip, suggestion or ideas?

Thanks


Snehal


On 7/24/2008 3:34:23 PM Micheal G. said ..
Were you clubbed by SP consultants for posting this very useful (To people new to SharePoint) tutorial? Very clean, concise information that worked to the "T" for me. For my purposes I'm not using Attachments so I don't have any feedback on the issues expressed by others. Thanks


On 7/24/2008 4:25:37 PM Sahil Malik said ..
LOL Michael :-)


On 8/4/2008 9:44:10 AM JohnH said ..
Howdy,

This worked great for me. However, how do you format these field items now? I don't want the radio buttons under each other - rather side-by-side. Does anyone know where to find information on actual formatting of these formfields?

Also, i'm interested if anyone was able to find information about the redirecturl. I want users to enter a new item, have the item submitted and returned back to the new item page. I'll have a separate link for a custom report - not the allitems.aspx.

Thanks in advance,


John


On 8/5/2008 1:21:25 AM Adrian said ..
I need to customize the OK button to direct to a confirmation page.


On 8/19/2008 2:47:26 PM Osama Abandeh said ..
I found the solution I found the solution I found the solution!!! You can make kind of workarround to solve this problem:

1- create from existing page


2- go down just below the main web part and insert List Form


3- you can run the form now and see that you have two forms for entering same information


4- delete the second form that you just entered


5- add Custom List form


6- IT WILL WORK AND THIS IS THE SOLVING FOR MICROSOFT BUG :D


On 8/26/2008 8:18:22 AM Poonam said ..
Osama,

Can you pls elaborate the steps?


On 8/28/2008 3:36:51 AM Osama Abandeh said ..
Ok Poonam, I will in two or three days, because i'm just buzy now :)


On 9/2/2008 4:10:27 AM Osama Abandeh said ..
Sorry for delay Poonam,

the steps are:


1- Right click on NewForm.aspx page and select New From Existing page


2- select the main web part (normally it will be webpartpage:listformwebpart)


3- press right arrow in keyboard and then enter


4- you are in the correct location to add custom component of list


5- Go to Insert->SharePoint Controls->Custom List Form


6- Select the list name and content type and select (edit will be suitable in this case)


7- save the page and test it, it should work fine


8- go page to SPD and delete the first web part


9- you can customize the new form as you wish

hope this is clear :)


On 10/2/2008 6:08:11 PM Bill Erickson said ..
I followed the instructions line by line.


the attachment quit working as soon as I deleted the first web part as stated in line 8.


are you able to make a custom form work with attachments??


On 10/8/2008 4:18:33 PM bob e said ..
One man (Marc Davis) has the solution to the botched attachments - I have not tried the fix as it is rather heinous:

http://cid-6d5649bcab6a7f93.spaces.live.com/blog/cns!6D5649BCAB6A7F93!130.entry

I am saddened by the fact I ned to resort to this... Come on Microsoft fix that code!


On 10/16/2008 8:48:07 AM Andy said ..
Hi


This is great. I have managed to create a custom form fine on Development, but ideally I want to deploy this to a production site, does anyone know how I can do this?


Thanks


Andy


On 10/22/2008 3:23:37 PM David Goebel said ..
I have been able to customize the NewForm page with a dropdown list that is bound to a filtered data source. No errors are produced and I am able to create new items in the list and save them without issue. However, I am having trouble with getting the corresponding customization to work on the EditForm page. The problem is that when I click on “Data Fields…” to bind the dropdown to the data source, the data fields for both display text and value do not show up in the “Change Data Bindings” dialog box.

When I click the OK button, it then puts blank properties for these items as datatextfield="" and datavaluefield="". When I attempt to edit an item, I get a browser message that says “An unexpected error has occurred.” If I then go back into the code and manually add the correct properties (which are datatextfield="Flow_x0020_Addition" and datavaluefield="ID"), I am able to open the item to edit it… however, when I make a change and then click save, I then get a browser message that says “Data Source Conflict: Your changes conflict with those made concurrently by another user. Refresh the form and submit your changes again.”

What am I doing wrong and/or what else do I need to do?


On 11/18/2008 4:03:52 PM RH said ..
So what should we do for attachment if it is required ?


On 12/3/2008 3:00:47 PM Adam Lowe said ..
I have published a guide on my blog that shows you how to accomplish this within the Sharepoint GUI. No need to go into Designer for most folks on this one and if you do it the way I’ve laid out it doesn’t break anything.

http://adambenjaminlowe.blogspot.com/2008/12/customizing-sharepoint-list-new-item.html


On 12/9/2008 2:14:19 PM Greg Shell said ..
In case you haven't heard: http://support.microsoft.com/kb/953271


On 1/5/2009 11:53:50 AM jc said ..
I'd like to customize Newform so the one choice column drives what columns are available for input (either by making them visible=false or by graying them out).

Possible without having to build the form from scratch? Possible with javascript?

Please email me at sales (-at-) cyberpine (-dot-) com


On 2/6/2009 12:52:07 AM Kris said ..
Thanks very much. It helped a lot.

Cheers,


Kris


On 2/12/2009 4:51:00 AM Sangati said ..
Hi,


The example you have explain is great !

I have following question


how do I do same steps for Discussion Board List.


I am able to change only newforma.aspx to customnewform.aspx, but I am not able to change message form in discussion board can you explain the following things


1] Custom Discussion form


2] Custom Message Form


for Discussion forum


On 2/19/2009 4:15:52 AM Anil said ..
Hi, i have one problem.i want to introduce a new Field/column(with one textbox and search button side by side) in newform.aspx which is to search the items from the list based on the text i typed in textbox and should display the results in the listbox. Ex.i have a 2 lists 1.Emplyoee and 2.Department now i want to assign employees to department say dept1. here i want to search the employees from the list whose name starting with letter "a" and assign them to the perticular department.

Does anyone has any suggestion or ideas?

Thanks


Anil


On 3/15/2009 11:18:44 PM Robert said ..
I'm having the same issue as David Goebel with Data Source Conflict error after adding a databound dropdown to an EditForm.aspx page. Anybody have any ideas?


On 3/21/2009 1:06:53 PM jc said ..
This is great!

But what if I want to build some smarts into my form and have one of the choice fields drive whether or not other textboxes are visible or not. It would appear the Conditional formating would handle this, but it does not. It appears to be a timing issue with Postback or databinding.

Any way to do that?

please email me at jc_pineiro at yahoo dot com.


On 4/20/2009 8:07:10 AM Socki said ..
I do that Osama Abandeh says but when I want to use my NewForm I havre always the same error which has "Invalid Page URL:"


Can you hepl me pleased?


Thanks


On 5/7/2009 12:27:40 AM yougyz said ..
Hi... I have a problem with adding custom list @newform.aspx...

Why there nothing happens, when i have add the custom list to newform.aspx? // no errors, no notification, nothing....

Can everyone tell me why.. also the solution of this...

Thanks,


YougyZ


On 5/21/2009 6:49:30 AM Roberto Marcos said ..
Repairing Supporting Files: “SharePoint alerts doesnt work” & “Invalid page URL”

Follow these steps to correct the problem

http://sharepointworks.blogspot.com/2009/05/repairing-supporting-files-sharepoint.html

Everything will work properly

Thaks,


RobertoMarcos.com


sharepointworks.blogspot.com


On 7/28/2009 10:04:48 PM phodchara said ..
If we set defualt of newform page to NewForm1.aspx. How do we access to old new form (newform.aspx)? i try to type directly to old new form (newform.aspx) but SharePoint list redirect to defualt (newform1.apsx).


On 10/27/2009 10:22:57 PM TPL said ..
To solve attachment problem


http://support.microsoft.com/kb/953271/en-us/


On 1/28/2010 7:42:58 AM Smriti Singh said ..
I followed the steps mentioned here to customize the NewForm.aspx page of a custom list.NewForm_1.aspx page was attached to the list.


But when I tried to create a new item got an 'Invalid Page Url'error.


Can anyone help me out with this.


On 3/4/2010 4:51:46 PM Robert J. Selzer said ..
I had the same problem as YougyZ. When I tried to add the custom listform, the page would blink. The tab would show an asterisk indicating that something changed. However, nothing changes. No listform or code is inserted. After several hours of research on the issue, I was about to give up but discovered a linkage to an unrelated issue I was working on. It turned out that Alternate Access Mappings were the cause of the problem. Several posts I read indicated that the friendly URL or IP could cause the problem and that I should use the machine name to connect with SP Designer. But I was using the machine name. The problem was that the Alternative Drive Mappings were not. They were set to an abbreviation i.e. http://machine/ instead of http://machine.domain.com/. Once I resolved the Drive Mappings to the fully qualified name, both issues were resolved. I hope this information can help someone else out there from losing clients or hair.


On 3/9/2010 5:42:44 PM gabriel said ..
acces fields on form any form , disbaled and asign value

pass in querysring sample newform.aspx?categoria=libros

<script type="text/javascript" language="javascript" >

_spBodyOnLoadFunctionNames.push("fillDefaultValues");

function fillDefaultValues()

{

//obtener querystring

var query = window.location.search.substring(1);


var vars = query.split("&");


//descomponer valor de categoria


var valor=vars[0].split('=')[1];

for(var i = 0; i < document.aspnetForm.elements.length; i++)


if ((document.aspnetForm.elements[i].title == "Categoria")) // give the title of the control that you want to disable


{


//alert(document.aspnetForm.elements[i].title);


document.aspnetForm.elements[i].disabled=true;;


if (valor!=null) {


document.aspnetForm.elements[i].value=valor;


}


}


}

</script>


On 3/15/2010 7:58:00 AM eman said ..
Thank you very much for this very useful description.


Sorry I did not understand the 6. Next, using a similar smart tag, do "Create Custom Content" for "PlaceHolderMain".


On 6/11/2010 4:59:14 PM bara said ..
Can we setup a search option in the anouncements tab? I want users to be bale to search based on the title of the announcements


if yes, how?


On 6/23/2010 1:00:12 PM mansour said ..
Thank you So much


On 7/23/2010 1:09:30 PM rama said ..
Hi Sahil,


Nice post .


My question is say for example if we add new columns to the list the NewForm will not automatically update itself with the columns added.Is there any work around for this.


Thanks .


On 9/6/2010 6:42:23 AM TechWiz44 said ..
Hi,


i'd like to open the NewForm.aspx in a new window. Basically i want to be able to click on the New (Add new item) and have the form open in a pop up window and when i've filled out the form, once i click ok the Allitems.aspx refreshes with the new list that was added. Please can you help me out? Thanks a lot


On 10/13/2010 7:45:04 PM Craig said ..
Can anyone tell me how I can hide the Gold stripe at the top of the form? I want it to be completely hidden. I added a hidden CEWP to the page and added the following code, but it still leaves a small strip of Gold on the left side. I even tried to get rid of it in designer and it didn't work. Any ideas??

<style>


.ms-areaseparatorright,.ms-titleareaframe,.ms-pagetitleareaframe,.ms-pagetitle,.ms-titlearea,.ms-leftareacell,.ms-sitemapdirectional,.ms-globallinks,.ms-areaseparatorleft,.ms-rightareacell,.ms-areaseparatorright, .ms-areaseparatorcorner,


.ms-titlearealeft,.ms-titlearearight,.ms-searchform,.ms-banner, .ms-buttonheightwidth2, .ms-globalTitleArea, .ms-globalbreadcrumb, .ms-pagetitleareaframe,


.ms-consolestatuscell, .ms-pagemargin, .ms-bodyareapagemargin, .ms-pagebottommarginleft,


.ms-pagebottommarginright, .ms-pagebottommargin, .ms-titleareaframe

{


display:none; }

/* doc viewer related styles */


.docLibViewer a{ margin-left: 2px;margin-right: 2px; }


.docLibViewer img { margin-left: 2px;margin-right: 2px; }

</style>


On 10/15/2010 8:30:00 AM ali raza said ..
Hi, I tried the following steps

1- Right click on NewForm.aspx page and select New From Existing page


2- select the main web part (normally it will be webpartpage:listformwebpart)


3- press right arrow in keyboard and then enter


4- you are in the correct location to add custom component of list


5- Go to Insert->SharePoint Controls->Custom List Form


6- Select the list name and content type and select (edit will be suitable in this case)


7- save the page and test it, it should work fine


8- go page to SPD and delete the first web part


9- you can customize the new form as you wish

And the new page starts opening (let's say NewForm1.aspx), however; when I try to comment out or remove the the webpart which was already added, the previous page (NewForm.aspx)is started opening. I can not customize the form...

any body have any idea how to solve it???


On 11/8/2010 6:28:45 AM neha said ..
how to make javascript compatible to all the Internet explorer as I have written a script in IE6 which is not working in IE7


On 12/10/2010 12:21:45 AM Jacques said ..
Hello. I uninstalled FP 2003 to install SPD 2010... I have 3 websites.. I could not open or edit any of my sites since SPD 2010 doesn't work with sites not created in SPD 2010. So I uninstalled SPD 2010 and installed SPD 2007. All is fine except for the Sharepoint Controls, under "Insert", that are all greyed out (except for the last one " More Sharepoint Controls"). I am trying to create an aspx page with a form so I can collect my customers' info. I also need that info to be emailed to me when they click "Submit". I need : 1.- to know how to fix this greyed out issue, 2.- how to make the submit send an email with the info to my email address. Any help would be much appreciated.


Thank you.


On 2/14/2011 1:30:02 AM Hussain said ..
hii i have followed ur steps but when i m clicking on new item from my site it is showing


Invalid Page Url


Thanxs in Advance


On 6/2/2011 3:28:26 PM Jan said ..
I've followed your instructions to add a couple of drop-down boxes and change the format of one of the existing fields in an Issues List - it was the clearest set of instructions that I found to update a form in SPD. WORKED GREAT!!! to change the entry form. But when you try to update an existing issue, even one created on the new form, the new form DOES NOT show up, only the original form with the original fields. Also when you open the list to show all the items, the new fields do not show up, only the original ones.


What do you need to do to update the forms for editing and displaying the existing data?

Thanks so much for any help.


On 2/3/2012 1:55:08 AM Mike said ..
Hi,


After I did what you said: Insert --> SharePoint Controls --> Custom List Form, I got the custom form, but my problem is, the star symbol after required field is missing. For example,after your "Title", there is a red star symbol, but for me, there isn't. Could you help me on this? Thank you in advance.