Pre populate NewForm.aspx fields with values

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi,

in WSSv2 the pre population of fields in a NewForm.aspx was done by a client based JavaScript. Here is an example: http://sharepointstudio.blogspot.com/2006/05/pre-populate-listfields-on-sharepoint.html

Is there a better way doing this with WSSv3? At least in SharePoint Designer it is possible to define (query based) parameters for custom list forms. I was able to display the value of a query string parameter using a easy <xsl:value-of select="$Parameter"/> syntax.

And I even was able to display a preselected value of a connected lookup field of the list. The following line displays the 3rd value of a lookup field "customer" in a task list.

<SharePoint:FormField runat="server" id="ff10{$Pos}" ControlMode="Display" FieldName="Customer" __designer:bind="{ddwrt:DataBind('i',concat('ff10',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Customer')}" ItemId="3"/>

But when I change the "ControlMode" parameter to "Edit" the "ItemId" is not used to pre populate the lookup field with the 3rd value. And if I set the "ControlMode" to "Display" in a NewForm.aspx the correct value of the lookup field is displayed but not saved in a new record.

Is there a possibility to accomplish this task with some build in functions? Or do I still need a fancy client based java script?

Thanks

Frank


.



Relevant Pages

  • Re: Text terminal rendering design
    ... The client is an application with need of a UI that works by ... what symbols it needs to display and the coordinates at which each ... In the case of most text terminals, a symbol is represented by a single ... complex conversion operations to put the symbol into a form that the ...
    (comp.object)
  • Re: Text terminal rendering design
    ... this would only be appropriate for a symbol that was instantiated purely for display compatibility. ... The only way I see is to have some separate notion of symbol identity that the client provides. ... available when each Icon is being constructed. ... What I thought you were representing was the fact that if a conversion is necessary, then there will be two Symbol instances in your UI software and you will provide both handles to the client to map to the relevant Icon. ...
    (comp.object)
  • Re: Text terminal rendering design
    ... Now I am how giving a reference to a Symbol to the client forces me ... deal with particular terminals. ... the client wants to do is display a single symbol, ... Conversion from one format to another is by ...
    (comp.object)
  • Re: Text terminal rendering design
    ... Symbols were only created for immediate display. ... the client is not going to be modifying ... instantiate the Symbol objects itself if the client has symbol data, ... symbol until after all the conversion and instantiation procedures ...
    (comp.object)
  • Re: Text terminal rendering design
    ... the client is not going to be modifying the Symbol.) ... The problem I am concerned about is giving the client one Symbol's address in a handle (when a conversion is involved) and the client has a subsequent request that applies to the other Symbol. ... For an instantiation problem this complex I think it would be highly desirable to use subclasses of for all instantiation so that there is a standardized way of handling instantiation and one can define context in the same way for all instantiations. ... If one decides to instantiate all the Symbols up front and then just select them for display all that changes is when SymbolFactory is invoked and mechanism for instantiating the display association just becomes a Find. ...
    (comp.object)