I currently have the following:
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff16{$Pos}" ControlMode="New" FieldName="Dept_x0020_Name" __designer:bind="{ddwrt:DataBind('i',concat('ff16',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Vessel_x0020_Name')}" Visible="False"/>
<SharePoint:FieldDescription runat="server" id="ff16description{$Pos}" FieldName="Dept_x0020_Name" ControlMode="New"/>
</td>
What I want to be able to do is hide the entry on a new item form. I can hide it via the properties and visible to false; but I want to set the value (single line text) e.g. Department 429
, independent from the user.
I have tried setting the value option but I just can't set it - currently I am setting the field using the Default value option entered, but this is very crude and I do not wish to continue doing so.
Ideally I'd do this with javascript, but I have found many things saying jQuery may work instead but I just cannot make it work - so can someone assist and tell me how I convert this field into what I want it to be rather than what the user may enter?