Posts

Showing posts from September 21, 2011

Get or Set value for SharePoint field in NewForm, EditForm and DispForm (Get only in DispForm) By Alexander Bautz

Image
This article describes how to get or set the value for all standard SharePoint field types in in NewForm, EditForm and DispForm (Get only in DispForm). This solution is tested in IE8, Firefox 3.6.3. Instructions for getFieldValue The function “getFieldValue” takes four arguments: fin: FieldInternalName of the field to set the value for.dispform: true if used in DispForm. Defaults to false if omitted.multiValueJoinBy: String to insert as separator between multiple returned values. If omitted, separated by a comma.optionalFilter: Used for “SPFieldUser” and “SPFieldUserMulti” only. If set to “displayName” or omitted, returns the displayName for the user(s), if set to “loginName”, returns the loginName for the user(s). getFieldValue – example code in CEWP placed below the form: