How can JavaScript'ers create custom EditForm without understanding CAML and .NET !

[oscar]( “[email protected]”) -

could not make it work in wss


cakriwut -

Since it doesn’t use specialities of SPS, then it should work in wss too.


[Narendar Kumar]( “[email protected]”) -

Couldn’t be the right solution to make a cell(row) read only


cakriwut -

To. Narendar Kumar: Can you elaborate more? ie. “to make a cell(row) read only”. What do you wish to do? The article only showing how to modify editform and newform aspx - so we can protect uneditable field. If you need to create readonly cell, then other technique applies. So, please elaborate your comment.


Dennis Goedegebuure -

At first when I copied the Javascript from this site it didn’t work either in my environment. But then I noticed the code was a different color and not valid. If you copy the code from the example above you will get the right double quotation marks and the left double quotation marks along with it. When I replaced them with regular quotation marks it all worked just fine. http://www.w3schools.com/tags/ref_entities.asp


Cakriwut -

Thanks, Dennis, it seems like my desktop-blogger change the quotation marks. I’ll fix it.


anisha -

How can i do this using sharepoint designer 2007


Cakriwut -

Sharepoint Designer 2007 is the next version of frontpage 2003. Doing above tasks to edit WSS 2.0 - using SD2007 or FP2003 are basically same.


[Marc]( “[email protected]”) -

Very cumbersome! The code I came up with was two lines and didn’t require amending the existing page. Simply find the existing fieldpost, call .insertAdjacentHTML then (second line) hide the original post. You should also handle any changes to the original field, incase other JS code on the page wants to change that field for some reason.


Cakriwut -

Marc. I am not arguing your comment - as it was my 2 days expossion to Sharepoint. The idea is, we can always combat the challenge using any ways. Better approach has been implemented in, http://cakriwut.wordpress.com/2006/08/19/autofilled-sharepoints-form/ There you can see, that I already used what you might mean by two lines code.


[Adrian]( “[email protected]”) -

I have been trying your example many times but couldn’t make it work. I always get errors such as “One of the properties of the Web Part has an incorrect format. Windows SharePoint Services cannot deserialize the Web Part. Check the format of the properties and try again.” I am not sure where to put the and tags. Could you expand Figure 4?


[Soujanya]( “[email protected]”) -

Hi, Can I follow the method for SharePoint Server 2007 Beta edition to make a field in my list Readonly, or is there any other method like adding some JavaScript in my .CS file I mean in my front page. My task is almost same, here I explain the task, I have an SPListItem named “EmpName”, where this field will be automatically populated by the logged-in user name, when the user try to add a new Item to the List, now I need to make this EmpName field disabled from editing, as this field is automatically getting populated by the logged-in user name. Can I get any help how I can achieve this. Greatful if any one can help in this. awaiting for the help and solution.


Cakriwut -

Soujanya: For any list item, there is mandatory field “Created By” and “Modified By”. For your case, I suggest to use “Created By” field. If you want to put it into other “EmpName” field, then; make a calculated field “EmpName” which copies text from “Created By”.


[Soujanya]( “[email protected]”) -

Thank you cakriwut, I am sorry I did not understand, why I need to deal with the “Created By” or “Modified By”, when I want to make one of my SPField ReadOnly, I got one of the solutions to be dealing with the EditFrom.aspx as you explained about, but is there any other way of achieving it. Can I do it by customizing the existing files like onet.xml or schema.xml or any other. And adding them to the Site Definition or List definition. Hope you got what I am trying to explain and I will be very glad if I can any help furthur. And please also let me know if I can achieve it using some Javascript. Thanks Soujanya


[Soujanya]( “[email protected]”) -

Cakriwut please make a note that I am working in SharePoint 2007 beta version.


[Guy]( “[email protected]”) -

There is cake way to make SharePoint fields read only. There’s already a tag that does it for you. Look at the tag above Modified Date and Created by Date. This tag already changes edit fields to read only. You simply move the tag up the list as far as you want.


[Adrian]( “[email protected]”) -

Thanks Guy thats just the trick and so easy, i placed a copys of the tag above and below the fileds i wanted readonly and


[Yuri]( “[email protected]”) -

Nice trick! Very useful!!! comment: for some reason, the “value=“blablalba”” attribute in the input field does not have quotes on my portal. So i modified the value-searching part of the script to: s = InputTag.indexOf(“value=”); e = InputTag.indexOf(“name=”,s+6)-1; var InputValue = InputTag.substr(s+6,e-s-6); now it works correctly.


[Arun]( “[email protected]”) -

Hi Soujanya: How did u get the reference to the logged in user name in ur spsfield item is it through =Me if then that gives u only the something like Domain\username how do u get the firstname and lastname of the logged in user


[congr]( “[email protected]”) -

how to make field readonly in when Edit in Datasheet any idea?


Ferdi -

Hi, I cannot see my custom form in Sharepoint Designer 2007? - I just see a form with three fields “Column Name 1; Column Name 2 and Column Name 3” How do I view my custom form and its code?


Helen Eriksson -

Hi, Since the function in FrontPage 2003 “Customize SharePoint List Form” not is valiable in SharePoint Designer 2007 (not that I’ve notice anyway) I need to know how to make a field read-only?! My list in SharePoint is a customized list with errends, and when att choose to create a new errend my field “Errendtype” needs to be read-only and with a defualt value.


I need to supplement a choice domain to sharepoint that has values depending on a tide selection - Zumbach Gyan -

[…] Making a domain read-only […]


I need to supplement a choice domain to sharepoint that has values depending on a tide selection | Ziak -

[…] Making a domain read-only […]


Avatar
Riwut Libinuko
Sr. Cloud Solution Architect

My research interests include distributed robotics, mobile computing and programmable matter.

comments powered by Disqus

Related