I'm probably one of the biggest fans of SharePoint, because it enables me to do virtually anything with a bit of creativity. So you can expect some more of the SharePoint stuff here (by the way: I'm not a programmer, so don't catch me on too technical details.)
One thing that was annoying me and some of our customers is that when entering info into rich text field it was simply too narrow. The width is for resolution 1024x768. That's all fine and dandy, but if you like to type a lot the narrow field when entering information just won't do.
To expand the field you have to open the NewForm.aspx and EditForm.aspx in FrontPage or SharePoint designer and just before the </body> tag add the following code:
<script language="javascript" type="text/javascript">
document.getElementById('urn:schemas-microsoft-com:office:office#FIELDNAME_iframe').style.width=WIDTH
</script>
Ofcourse replace the FIELDNAME with actual name of the field and WIDTH with desired width in pixels.
For the FIELDNAME you have to use the SharePoint name, not the display name (sometimes they aren't the same). You can find the SharePoint name of the field easily if you
One thing that was annoying me and some of our customers is that when entering info into rich text field it was simply too narrow. The width is for resolution 1024x768. That's all fine and dandy, but if you like to type a lot the narrow field when entering information just won't do.
To expand the field you have to open the NewForm.aspx and EditForm.aspx in FrontPage or SharePoint designer and just before the </body> tag add the following code:
<script language="javascript" type="text/javascript">
document.getElementById('urn:schemas-microsoft-com:office:office#FIELDNAME_iframe').style.width=WIDTH
</script>
Ofcourse replace the FIELDNAME with actual name of the field and WIDTH with desired width in pixels.
For the FIELDNAME you have to use the SharePoint name, not the display name (sometimes they aren't the same). You can find the SharePoint name of the field easily if you
- modify settings and columns of the list
- click on the name of the field in the "Columns" section
- check value of parameter Field in the URL (click on image below to see the screenshot)
Save the file and you'll have the result. Click on the thumbnails below to see larger images.
Before:
Code:
After:
There you have it. Not as nice to look at, but nicer to write in :).
No comments:
Post a Comment