<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stefan Cameron on Forms &#187; Tips</title>
	<atom:link href="http://forms.stefcameron.com/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Wed, 16 Feb 2011 22:56:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Show the List of a Drop Down List</title>
		<link>http://forms.stefcameron.com/2010/05/31/show-the-list-of-a-drop-down-list/</link>
		<comments>http://forms.stefcameron.com/2010/05/31/show-the-list-of-a-drop-down-list/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 03:06:12 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XFA]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/?p=548</guid>
		<description><![CDATA[Did you know that the list portion of a drop down list field can be displayed programmatically? You can set focus to the field and force its drop list to be displayed all in a single API call: xfa.host.openList(@object) xfa.host.openList(@string) -- deprecated since XFA 2.6 where @object is a reference to the drop down list [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that the list portion of a drop down list field can be displayed programmatically? You can set focus to the field and force its drop list to be displayed all in a single API call:</p>
<pre><code>xfa.host.openList(@object)
xfa.host.openList(@string) -- deprecated since XFA 2.6</code></pre>
<p>where @object is a reference to the drop down list field and @string is the SOM expression of the drop down list field.</p>
<pre><code>xfa.host.openList(myDropDownList); // set focus/show the drop list</code></pre>
<p>The second form of the API has been deprecated since XFA 2.6 which means that since Designer 8.1, it is preferred to use the first form which takes a reference to the field rather than its SOM expression.</p>
<p>If you&#8217;re using Designer 8.0 or earlier, you can get the SOM expression of any field by using its <em>somExpression</em> property:</p>
<pre><code>xfa.host.openList(ddlInDesigner71.somExpression)</code></pre>
<p>This works in both JavaScript and FormCalc with the same syntax.</p>
<p>Now if only there was a way to programmatically show the drop calendar of a date/time field&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2010/05/31/show-the-list-of-a-drop-down-list/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tip: Accessing Form Properties Preview Tab</title>
		<link>http://forms.stefcameron.com/2010/02/11/tip-accessing-form-properties-preview-tab/</link>
		<comments>http://forms.stefcameron.com/2010/02/11/tip-accessing-form-properties-preview-tab/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 17:21:43 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Designer]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2010/02/11/tip-accessing-form-properties-preview-tab/</guid>
		<description><![CDATA[Did you know you could quickly access the Preview tab in the Form Properties dialog from the PDF Preview tab&#8217;s context menu? My friend Angie Okamoto (Easel Solutions) was the one who originally pointed this out to me. It&#8217;s incredibly useful, especially when you&#8217;re switching between various preview data files (or options like interactive vs [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know you could quickly access the Preview tab in the Form Properties dialog from the PDF Preview tab&#8217;s context menu?</p>
<p>My friend Angie Okamoto (<a href="http://www.easelsolutions.com/">Easel Solutions</a>) was the one who originally pointed this out to me. It&#8217;s incredibly useful, especially when you&#8217;re switching between various preview data files (or options like interactive vs non-interactive), because it loads the dialog and activates the Preview tab in a single step. This saves both mouse travel time and one click which adds-up to a lot, if you do this frequently.</p>
<p><span id="more-500"></span>
<p><strong>Right-click on the PDF Preview tab</strong> to get the context menu:</p>
<p><img src="http://forms.stefcameron.com/images/FormProperties/FormProps-PdfPreviewTab-ContextMenu.jpg"> </p>
<p>Choose &#8220;Form Properties&#8221; and you&#8217;re right on the Preview tab:</p>
<p><img src="http://forms.stefcameron.com/images/FormProperties/FormProps-PreviewTab.jpg"> </p>
<p>Another option is to set a <strong>Shortcut Key </strong>for the Form Properties dialog, though this won&#8217;t auto-select the Preview tab (but still saves some mouse travel and a couple of clicks). You can do this via the &#8220;Tools &gt; Keyboard Shortcuts&#8221; dialog:</p>
<p><img src="http://forms.stefcameron.com/images/FormProperties/FormProps-ShortcutKey.jpg"></p>
<p>Unfortunately, I don&#8217;t recall what version of Designer introduced the PDF Preview tab&#8217;s context menu nor which one added Keyboard Shortcuts but I think both should be available since version 8.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2010/02/11/tip-accessing-form-properties-preview-tab/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tip: Inserting Line Breaks in Text</title>
		<link>http://forms.stefcameron.com/2010/01/29/tip-inserting-line-breaks-in-text/</link>
		<comments>http://forms.stefcameron.com/2010/01/29/tip-inserting-line-breaks-in-text/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 16:51:01 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[XFA]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/?p=495</guid>
		<description><![CDATA[Did you know that you could insert a line break, as opposed to a paragraph break, in between two lines in a text object using the [Shift + Enter] keyboard sequence? When editing the contents of a text object, pressing the [Enter] key will produce a paragraph break which means that any Above and/or Below [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that you could insert a line break, as opposed to a paragraph break, in between two lines in a text object using the [Shift + Enter] keyboard sequence?
<p>When editing the contents of a text object, pressing the [Enter] key will produce a paragraph break which means that any Above and/or Below Spacing you have specified will come into effect, amongst other paragraph formatting-related properties. Under the hood, the effect is the insertion of a &#8220;new line&#8221; character (\n) in a plain text object or a new &lt;p&gt; tag in a rich (XHTML) text object.</p>
<p>Sometimes, however, you need to break a line <em>without</em> producing a new paragraph. For example, you might have a long URL to insert and, given its position within the contents, it ends-up being broken onto another line and you would prefer to keep it on a single line, yet part of the same paragraph. To do this, use the [Shift + Enter] keyboard sequence. The result is a &#8220;soft&#8221; break to another line without moving to a new paragraph. Under the hood, this translates into the insertion of a U+2029 Unicode break character in plain text or a &lt;br&gt; tag in rich (XHTML) text.</p>
<p>Those of you using a version of Designer which precedes the 8.2.1 release should note that when using [Shift + Enter] in a plain text object, the contents of the object gets converted into rich text since previous versions of Designer would always use the &lt;br&gt; tag to denote a line break. Designer 8.2.1 coincided with the release of Acrobat/Reader 9.0 which provided improvements to the Text Engine in order to support the plain text U+2029 Unicode break character.</p>
<p><span id="more-495"></span></p>
<h2>Line Breaks in Acrobat/Reader</h2>
<p>What I describe above relates to the <em>authoring</em> experience in Designer. Inserting line breaks (as opposed to paragraph breaks) while <em>filling</em> a form in Acrobat/Reader is different. <a href="http://blogs.adobe.com/formfeed/">John Brinkman</a> explains the &#8220;why and how&#8221; in <a href="http://blogs.adobe.com/formfeed/2009/01/paragraph_breaks_in_plain_text.html">this post</a>.</p>
<h2>Sample Form</h2>
<p><a href="http://forms.stefcameron.com/samples/TextBreaks.pdf">Download Sample [pdf]</a>
<p>I have included a sample for that demonstrates the different types of breaks in both plain and rich text objects. I also included a text field that has a multi-line rich text caption (the contents of the rich text object) and a multi-line default value (the contents of the plain text object), both using paragraph and line breaks. (If you&#8217;re wondering how I got those values into the caption and default value properties, I used good old Copy &amp; Paste in both cases.)</p>
<p><strong>Minimum Sample Requirements:</strong> I authored this sample using Designer 8.2.1.2 and Acrobat 9.3. It should work back to Acrobat 9.0. I&#8217;m unsure of the results in earlier versions of Designer and Acrobat due to the use of the U+2029 character in plain text.</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2010/01/29/tip-inserting-line-breaks-in-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Pretty XML Strings</title>
		<link>http://forms.stefcameron.com/2009/08/19/tip-pretty-xml-strings/</link>
		<comments>http://forms.stefcameron.com/2009/08/19/tip-pretty-xml-strings/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 12:50:21 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/19/tip-pretty-xml-strings/</guid>
		<description><![CDATA[I regularly use the saveXML() method, available on all node class-based objects, as a way to debug my forms (think of it as a type of introspection technique). The method outputs a string representation of the XML content of the node in question, which helps when attempting to discover the underlying object structure without a [...]]]></description>
			<content:encoded><![CDATA[<p>I regularly use the saveXML() method, available on all node class-based objects, as a way to debug my forms (think of it as a type of introspection technique). The method outputs a string representation of the XML content of the node in question, which helps when attempting to discover the underlying object structure without a debugger&#8230;</p>
<p>For example, say you have a simple form with a text field and a numeric field. The following statement will output the form&#8217;s data to the JavaScript Console in Acrobat:</p>
<pre><code>console.println(xfa.datasets.data.saveXML());</code></pre>
<p>The result, however, isn&#8217;t very readable:</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
&gt;&lt;form1
&gt;&lt;TextField1
&gt;asdf&lt;/TextField1
&gt;&lt;NumericField1
&gt;1234&lt;/NumericField1
&gt;&lt;/form1
&gt;&lt;/xfa:data
&gt;</code></pre>
<p>Though I had been using saveXML() for quite some time, I hadn&#8217;t realized that it actually takes an optional parameter, a string with a value of &#8220;pretty&#8221;, that results in much nicer output.</p>
<pre><code>console.println(xfa.datasets.data.saveXML('pretty'));</code></pre>
<p>results in the following pretty/readable output:</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"&gt;
&nbsp;&nbsp;&nbsp;&lt;form1&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;TextField1&gt;asdf&lt;/TextField1&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;NumericField1&gt;1234&lt;/NumericField1&gt;
&nbsp;&nbsp;&nbsp;&lt;/form1&gt;
&lt;/xfa:data&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/08/19/tip-pretty-xml-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FormFeed Debugging Tips</title>
		<link>http://forms.stefcameron.com/2009/05/27/formfeed-debugging-tips/</link>
		<comments>http://forms.stefcameron.com/2009/05/27/formfeed-debugging-tips/#comments</comments>
		<pubDate>Wed, 27 May 2009 20:28:34 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[Form Guides]]></category>
		<category><![CDATA[Script Editor]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/05/27/formfeed-debugging-tips/</guid>
		<description><![CDATA[My friend John Brinkman has posted a really good list of handy form development and debugging tips. Check it out! These tips could save you a lot of time and effort. I use them all the time when I work on forms with Designer, Acrobat and LiveCycle Forms. One other nice thing about console.println() for [...]]]></description>
			<content:encoded><![CDATA[<p>My friend John Brinkman has posted a <a href="http://blogs.adobe.com/formfeed/2009/05/collected_form_development_and.html">really good list</a> of handy form development and debugging tips. Check it out! These tips could save you <em>a lot</em> of time and effort. I use them all the time when I work on forms with Designer, Acrobat and LiveCycle Forms.</p>
<p>One other nice thing about <a href="http://forms.stefcameron.com/2006/05/05/debugging-scripts/">console.println()</a> for outputting debug information to the JavaScript Console in Acrobat is that these strings are also output to the Flash Log when you run <a href="http://forms.stefcameron.com/category/form-guides/">form guides</a> generated with LiveCycle ES Update 1 (8.2.1) using the Flash Debug Player. (The <a href="http://forms.stefcameron.com/2008/11/19/max-2008-tutorial-part3/">3rd part</a> of my MAX 2008 Tutorial series has details on how to set this up under the &#8220;Flash Log and Debug Players&#8221; section.)</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/05/27/formfeed-debugging-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Default Subform Binding Options</title>
		<link>http://forms.stefcameron.com/2009/04/23/tip-default-subform-binding-options/</link>
		<comments>http://forms.stefcameron.com/2009/04/23/tip-default-subform-binding-options/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 21:07:18 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Data Binding]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[XFA]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/04/23/tip-default-subform-binding-options/</guid>
		<description><![CDATA[Did you know that you can specify the default data binding for new subforms in the &#8220;Tools menu &#62; Options dialog &#62; Data Binding panel&#8221;? &#160; The default setting is &#8220;Normal&#8221; which means that all new subforms you insert from the Object Library with have their &#8220;Object palette &#62; Binding tab &#62; Default Binding property&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that you can specify the default data binding for new subforms in the &#8220;Tools menu &gt; Options dialog &gt; Data Binding panel&#8221;?</p>
<p>&nbsp;<img src="http://forms.stefcameron.com/images/DefaultSubformBindingOption.jpg"></p>
<p>The default setting is &#8220;Normal&#8221; which means that all new subforms you insert from the Object Library with have their &#8220;Object palette &gt; Binding tab &gt; Default Binding property&#8221; set to &#8220;Normal&#8221; which means implicit binding using the subform&#8217;s name.</p>
<p>Setting this to &#8220;None&#8221; will result in all new subforms having a default binding of &#8220;None&#8221; which means they don&#8217;t participate in data binding by default. Since subforms are often needed purely for form layout, I find it&#8217;s safer to use this setting because I know inserting new subforms will not affect any bindings I have already setup in my form. (While it&#8217;s true that unnamed subforms don&#8217;t participate in data binding, I always name my subforms for clarity and scripting purposes so setting the binding to &#8220;None&#8221; ensures they don&#8217;t mess with data binding unless I want them to.)</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/04/23/tip-default-subform-binding-options/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

