Stump the Panel Topic: default text in multi-line text block http://www.endusersharepoint.com/STP/ SharePoint QA en Sun, 26 Jul 2009 10:54:46 +0000 Nelson on "default text in multi-line text block" http://www.endusersharepoint.com/STP/topic/default-text-in-multi-line-text-block#post-8647 Thu, 23 Jul 2009 13:49:47 +0000 Nelson 8647@http://www.endusersharepoint.com/STP/ <p>Hello Eric,</p> <p>Thanks for the reply. I know you're busy and I also know that this is not an emergency -- HOWEVER, if you do find yourself with some open time, I'd very much appreciate you taking a second look at this.</p> <p>Thanks<br /> Dave M </p> eric on "default text in multi-line text block" http://www.endusersharepoint.com/STP/topic/default-text-in-multi-line-text-block#post-8633 Thu, 23 Jul 2009 10:11:29 +0000 eric 8633@http://www.endusersharepoint.com/STP/ <p>I'm sure it can be done. The code would have to be monkied with to get it right most likely. I have only used the above method to set default values in lookup lists so it would take a bit of testing for me to figure out the multi-line fields. </p> david m on "default text in multi-line text block" http://www.endusersharepoint.com/STP/topic/default-text-in-multi-line-text-block#post-8608 Wed, 22 Jul 2009 12:17:15 +0000 david m 8608@http://www.endusersharepoint.com/STP/ <p>Eric, thank you so much for your assistance. After thinking about this (and getting some feedback), what I really would like to do is have the multi-line text box (with Rich Text option applied) default to numbering (vs Bullets). Can we do this?</p> <p>Thank You.</p> <p>Dave M </p> eric on "default text in multi-line text block" http://www.endusersharepoint.com/STP/topic/default-text-in-multi-line-text-block#post-8603 Wed, 22 Jul 2009 10:24:39 +0000 eric 8603@http://www.endusersharepoint.com/STP/ <p>Place it just after PlaceHolderMain.<br /> <pre><code>&lt;asp:Content ContentPlaceHolderId=&quot;PlaceHolderMain&quot; runat=&quot;server&quot;&gt; &lt;script type=&quot;text/javascript&quot;&gt; Your Script &lt;/script&gt; &lt;table cellpadding=0 cellspacing=0 id=&quot;onetIDListForm&quot;&gt;</code></pre> david m on "default text in multi-line text block" http://www.endusersharepoint.com/STP/topic/default-text-in-multi-line-text-block#post-8601 Wed, 22 Jul 2009 08:29:57 +0000 david m 8601@http://www.endusersharepoint.com/STP/ <p>Thank you Eric and Jay for the great feedback -- lets make sure I've got this right ---(I'm still in my learning curve)<br /> I've got my custom list with the multi-line text box fields (I've got 2 on this list) -<br /> I go into SPD, copy the NewForm.ASPX, open it, click on the field - then go to code view (or be in split screen). From this point I'm unsure about where to insert the script. Do I put in after the &lt;tr&gt; ? Or somewhere else?</p> <p>Thanks in advance for your great help. </p> Jay on "default text in multi-line text block" http://www.endusersharepoint.com/STP/topic/default-text-in-multi-line-text-block#post-8595 Tue, 21 Jul 2009 18:03:41 +0000 Jay 8595@http://www.endusersharepoint.com/STP/ <p>I've also used the solution eric linked to because I needed to have default text for the Description field in one of my calendars to be set with specific formatted text.</p> <p>He's right about the textarea as the selector, use that instead of 'input'.<br /> You'll want something like this:</p> <pre><code>function setTextAreaFromFieldName(fieldName, value) { if (value == undefined) return; var theInput = getTagFromIdentifierAndTitle(&quot;textarea&quot;,&quot;TextField&quot;,fieldName); theInput.value=value;</code></pre> <p>The text I needed had to be blue and bolded.<br /> Here's what I used:</p> <pre><code>setTextAreaFromFieldName(&quot;Description&quot;,(&#39;&lt;font color=&quot;#0000ff&quot;&gt;&lt;b&gt;Content:&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#0000ff&quot;&gt;&lt;b&gt;Class Highlights:&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#0000ff&quot;&gt;&lt;b&gt;Target and Recommended Audience:&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#0000ff&quot;&gt;&lt;b&gt;Class Dates/Times:&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#0000ff&quot;&gt;&lt;b&gt;Sign Up Sheet:&lt;/b&gt;&lt;/font&gt; &lt;font color=&quot;#0000ff&quot;&gt;&lt;b&gt;Class Length:&lt;/b&gt;&lt;/font&gt; &#39;));</code></pre> eric on "default text in multi-line text block" http://www.endusersharepoint.com/STP/topic/default-text-in-multi-line-text-block#post-8583 Tue, 21 Jul 2009 11:55:50 +0000 eric 8583@http://www.endusersharepoint.com/STP/ <p>This should work. I haven't used it in multi-line fields but have used it for look up lists in the past. <a href="http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx" rel="nofollow">http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx</a></p> <p>Be sure to peruse the comments as there is a tidbit in there about using textarea as the selector for the textarea not textfield as listed. </p> david m on "default text in multi-line text block" http://www.endusersharepoint.com/STP/topic/default-text-in-multi-line-text-block#post-8579 Tue, 21 Jul 2009 10:27:28 +0000 david m 8579@http://www.endusersharepoint.com/STP/ <p>Hello,</p> <p>I need some advice. I have a custom list with a "multi-line text box" field that I'd like to put in some default text (to help guide the user). No avenue when adding the column and I haven't been able to get SPD to put anything in the block either. I saw this had come up a couple of months ago -- is there a way to do this? </p>