开发者

How can the width of a SharePoint:FormField be adjusted?

Within MOSS2007, I'm building a custom form (newform2.aspx) for a list, and having a real problem trying to adjust the width of my form fields.

Here is some of the code I'm trying to adjust:

<tr>
  <td colspan="3" style="padding-top:5px; padding-bottom:5px; width:100%; ">DescriptionText<br/>
  <SharePoint:FormField runat="server" id="ff16{$Pos}" ControlMode="New" FieldName="Jobsite" __designer:bind="{ddwrt:DataBind('i',concat('ff16',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Jobsite')}"/>
  </td>
</tr>

I've tried setting DisplaySize within the Form:Field control, and it changes within SharePoint Designer, but when I view th开发者_运维知识库e actual page, the box always remains at it's default length.


Nothing like solving your own question. ;)

I found that wrapping the FormField control in <div>'s in combination with the DisplaySize attribute gave me the control I needed to format the fields properly.


I tried to insert text input into table and had same trouble.

Add

.ms-long{width:95%;}

as style into PlaceHolderAdditionalPageHead placeholder: https://gist.githubusercontent.com/Gennady-G/91f045816068d9a38f1133135dc94bae/raw/271eb9012497b57f667b26858e0e7796625803e9/gistfile1.txt


Add this in your custom page. It works for me under SharePoint 2010.

<style type="text/css">.ms-long{width:100%;}</style>"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜