<?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>Design Disclosure - Portfolio &#38; Personal Blog of Alistair Stead &#187; JavaScript</title>
	<atom:link href="http://www.designdisclosure.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designdisclosure.com</link>
	<description>Developing web and iphone applications for fun, profit or distraction</description>
	<lastBuildDate>Mon, 07 Dec 2009 23:28:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>YUI Connect asynchronous file uploads</title>
		<link>http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/</link>
		<comments>http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 14:26:16 +0000</pubDate>
		<dc:creator>Alistair Stead</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.designdisclosure.com/?p=122</guid>
		<description><![CDATA[I&#8217;m sure the problems with multi-part data that I have been working through this morning is very simple but there are a number of forum posts about this, so I will share my findings. When using YUI Connection Manager in conjunction with multi-part form data I have experienced problems creating the asynchronous request and canceling [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure the problems with multi-part data that I have been working through this morning is very simple but there are a number of forum posts about this, so I will share my findings. When using YUI Connection Manager in conjunction with multi-part form data I have experienced problems creating the asynchronous request and canceling the form submission. Even after setting up the request and callback object and checking the YUI API repeatedly the problem resides elsewhere.</p>
<pre class="textmate-source"><span class="source source_js">YAHOO.util.Event<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addListener<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>forms<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>submit<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="variable variable_language variable_language_js">this</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>_onFormSubmit<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="variable variable_language variable_language_js">this</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>

<span class="meta meta_function meta_function_json meta_function_json_js"><span class="entity entity_name entity_name_function entity_name_function_js">_onFormSubmit</span>: <span class="storage storage_type storage_type_function storage_type_function_js">function</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_js">(</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_js">e, o</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_js">)</span></span>
<span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
  YAHOO&gt;util.Event<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>preventDefault<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>e<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Set the form
</span>  YAHOO<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>util<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>Connect<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>setForm<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>e<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>currentTarget<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Configure the callback object
</span>  callBackObj <span class="keyword keyword_operator keyword_operator_js">=</span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
    success: o<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>_loadRemoteFormSubmissionTemplateComplete<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">,</span>
    failure: o<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>_loadRemoteFormSubmissionTemplateFailed<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">,</span>
    argument: <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
      objType: objType<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>
      region: regionObj<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">,  </span>
      mode: submitbutton<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span><span class="support support_constant support_constant_dom support_constant_dom_js">value</span><span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span>
  <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span>
  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Make the request
</span>  YAHOO<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>util<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>Connect<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>asyncRequest<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>POST<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>e<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>currentTarget<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span><span class="support support_constant support_constant_dom support_constant_dom_js">action</span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>callBackObj<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
<span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span></span></pre>
<p>With non multi-part forms you can hijack the submit event of the form and create an asynchronous request. However once you try with multi-part data no matter how you set this up and attempt to cancel the form submit action the form will still make an HTTP request in the main window.</p>
<h2>The YUI Multi-Part Data Solution</h2>
<p>The solution is very simple once you find it but it is easy to overlook! In order to use YUI connect to create an asynchronous request you must remove the &#8216;submit&#8217; button and replace it with a &#8216;button&#8217; then assign it an eventListener that will create the asyncRequest.</p>
<pre class="textmate-source"><span class="source source_js"><span class="storage storage_type storage_type_js">var</span> alternateButton <span class="keyword keyword_operator keyword_operator_js">=</span> <span class="support support_class support_class_js">document</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span><span class="support support_function support_function_dom support_function_dom_js">getElementById</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>alternateButtonId<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span>
YAHOO.util.Event<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>addListener<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>alternateButton<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>click<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="variable variable_language variable_language_js">this</span><span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>_onFormSubmit<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span><span class="variable variable_language variable_language_js">this</span><span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>

<span class="meta meta_function meta_function_json meta_function_json_js"><span class="entity entity_name entity_name_function entity_name_function_js">_onFormSubmit</span>: <span class="storage storage_type storage_type_function storage_type_function_js">function</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_begin punctuation_definition_parameters_begin_js">(</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_js">e, o</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_end punctuation_definition_parameters_end_js">)</span></span>
<span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
  YAHOO.util.Event<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>preventDefault<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>e<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Set the form
</span>  YAHOO<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>util<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>Connect<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>setForm<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span>e<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>currentTarget<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Configure the callback object
</span>  callBackObj <span class="keyword keyword_operator keyword_operator_js">=</span> <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
    success: o<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>_loadRemoteFormSubmissionTemplateComplete<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">,</span>
    failure: o<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>_loadRemoteFormSubmissionTemplateFailed<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">,</span>
    argument: <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">{</span>
      objType: objType<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>
      region: regionObj<span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">,  </span>
      mode: submitbutton<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span><span class="support support_constant support_constant_dom support_constant_dom_js">value</span><span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span>
  <span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span>
  <span class="comment comment_line comment_line_double-slash comment_line_double-slash_js"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_js">//</span> Make the request
</span>  YAHOO<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>util<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>Connect<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>asyncRequest<span class="meta meta_brace meta_brace_round meta_brace_round_js">(</span><span class="string string_quoted string_quoted_single string_quoted_single_js"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_js">'</span>POST<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_js">'</span></span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>e<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span>currentTarget<span class="meta meta_delimiter meta_delimiter_method meta_delimiter_method_period meta_delimiter_method_period_js">.</span><span class="support support_constant support_constant_dom support_constant_dom_js">action</span><span class="meta meta_delimiter meta_delimiter_object meta_delimiter_object_comma meta_delimiter_object_comma_js">, </span>callBackObj<span class="meta meta_brace meta_brace_round meta_brace_round_js">)</span><span class="punctuation punctuation_terminator punctuation_terminator_statement punctuation_terminator_statement_js">;</span>
<span class="meta meta_brace meta_brace_curly meta_brace_curly_js">}</span></span></pre>
<p>When trying to use multi-part data YUI Connection Manager will create an iframe in the document that your form will submit the data to. If you try and use the submit handler YUI currently does not change the target value of the submit event.</p>
<p>The YUI examples do all show the use of alternate buttons rather than a standard submit button however it can be easily overlooked. I hope this helps someone!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=YUI+Connect+asynchronous+file+uploads+-+http://tr.im/FzoQ&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;title=YUI+Connect+asynchronous+file+uploads" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;title=YUI+Connect+asynchronous+file+uploads" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;title=YUI+Connect+asynchronous+file+uploads" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;title=YUI+Connect+asynchronous+file+uploads&amp;summary=I%27m%20sure%20the%20problems%20with%20multi-part%20data%20that%20I%20have%20been%20working%20through%20this%20morning%20is%20very%20simple%20but%20there%20are%20a%20number%20of%20forum%20posts%20about%20this%2C%20so%20I%20will%20share%20my%20findings.%20When%20using%20YUI%20Connection%20Manager%20in%20conjunction%20with%20multi-part%20form%20data%20I%20have%20experienced%20problems%20creating%20the%20a&amp;source=Design Disclosure - Portfolio &amp; Personal Blog of Alistair Stead" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;title=YUI+Connect+asynchronous+file+uploads" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;t=YUI+Connect+asynchronous+file+uploads" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;title=YUI+Connect+asynchronous+file+uploads" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/&amp;title=YUI+Connect+asynchronous+file+uploads&amp;description=I%27m%20sure%20the%20problems%20with%20multi-part%20data%20that%20I%20have%20been%20working%20through%20this%20morning%20is%20very%20simple%20but%20there%20are%20a%20number%20of%20forum%20posts%20about%20this%2C%20so%20I%20will%20share%20my%20findings.%20When%20using%20YUI%20Connection%20Manager%20in%20conjunction%20with%20multi-part%20form%20data%20I%20have%20experienced%20problems%20creating%20the%20a" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<h3  class="related_post_title">Related Articles</h3><ul class="related_post"><li>No Related Post</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>sfPokaYokePlugin symfony Client Side Validation</title>
		<link>http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/</link>
		<comments>http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 17:05:28 +0000</pubDate>
		<dc:creator>Alistair Stead</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[None]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.blog.co.uk/?p=18</guid>
		<description><![CDATA[The sfPokaYokePlugin (pronounced with the &#8216;e&#8217; on the end e.g. poka-yoki). Simply put it is the use of simple mechanisms that stop mistakes being made. sfPokaYoke provides client-side form validation based on existing action.yml validation files. This validator will provide fully configurable inline errors on blur events and listed errors once the form is submitted. [...]]]></description>
			<content:encoded><![CDATA[<p>The <tt>sfPokaYokePlugin</tt> (pronounced with the &#8216;e&#8217; on the end e.g. poka-yoki).  Simply put it is the use of simple mechanisms that stop mistakes being made.   sfPokaYoke provides client-side form validation based on existing <tt>action.yml</tt> validation files.  This validator will provide fully configurable inline errors on blur events and listed errors once the form is submitted.</p>
<p>This plugin was built after reading &#8220;Designing the Obvious&#8221; by Robert Hoekman, jr. and working with a number of unsatisfactory  validation libraries. It is intended that this plugin will allow you to configure the validation and feedback to make your forms poka yoke devices i.e. impossible for users to make any errors while entering data.</p>
<p>Thanks to Alon Noy for a starting point for the validators! The following symfony validators have been ported to JavaScript implemented in the plugin:</p>
<ul>
<li>sfStringValidator</li>
<li>sfNumberValidator</li>
<li>sfRegexValidator</li>
<li>sfEmailValidator</li>
<li>sfCompareValidator</li>
</ul>
<p>I also plan to implement a client side callback validator that will allow you to call your own client side validators or even call ajax function to run server side validation in real time.<span id="more-18"></span></p>
<h2 id="Installation">Installation</h2>
<p>To install the plugin you can either download the latest files from the symfony wiki or you can checkout the SVN version.</p>
<h3>Install the plugin</h3>
<pre class="textmate-source sunburst"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">symfony plugin-install <span class="markup markup_underline markup_underline_link markup_underline_link_text">http://plugins.symfony-project.com/sfPokaYokePlugin</span></span></span></pre>
<h3>Add the sfPokaYoke filter to your app filters.yml</h3>
<pre class="textmate-source sunburst"><span class="source source_yaml"><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">rendering<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">~
</span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">web_debug<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">~
</span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">security<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">~
</span></span>
<span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> generally, you will want to insert your own filters here
</span>
<span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">poka_yoke<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span><span class="string string_unquoted string_unquoted_yaml">
</span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">class<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">sfPokaYokeFilter
</span></span>
<span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">cache<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span>     <span class="string string_unquoted string_unquoted_yaml">~
</span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">common<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span>    <span class="string string_unquoted string_unquoted_yaml">~
</span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">flash<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span>     <span class="string string_unquoted string_unquoted_yaml">~
</span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">execution<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">~</span></span></span></pre>
<h3>Clear you cache</h3>
<pre class="textmate-source sunburst"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">symfony cc</span></span></pre>
<p>You&#8217;re done. Any forms that have validation rules will have client-side rules applied too. sfPokaYoke looks for validation rules that match the action name the form will be submitted to. This will also now work with named routes.</p>
<h2>Usage Example</h2>
<p>Once any validation rules are applied to the actions for your form, rules will be created for the client-side validation.</p>
<p>You can configure the client side validation to be triggered on the form submit or when the individual field loses focus. This is done by adding config values to your app.yml and will define how sfPokaYokePlugin responds to the users interaction</p>
<p>If the input value fails any validation rules that error will be inserted next to the input.</p>
<p>You do not need to add any <tt>&lt;div&gt;</tt> tags to capture these in-line errors unless you have a specific location in you form markup where you wish the error to be displayed. sfPokaYoke will look for the symfony form error locations and use those <tt>&lt;div&gt;</tt> tags if available.</p>
<p>If your template includes the following symfony form helper, sfPokaYoke will insert the errors into this location.</p>
<pre class="textmate-source sunburst"><span class="source source_php"><span class="source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html"><span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_begin punctuation_section_embedded_begin_php">&lt;?php</span> <span class="support support_function support_function_construct support_function_construct_php">echo</span> <span class="meta meta_function-call meta_function-call_php">form_error</span>(<span class="string string_quoted string_quoted_single string_quoted_single_php"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_php">'</span><span class="meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php">name</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_php">'</span></span>) <span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_end punctuation_section_embedded_end_php"><span class="source source_php">?</span>&gt;</span></span></span></pre>
<p>On form submission a list of all error is inserted as the first child of the form. Each listed error item has an onclick event attached to allow the user to click on the error to focus the form field and resolve the problem.</p>
<pre class="textmate-source sunburst"><span class="text text_html text_html_basic"><span class="meta meta_tag meta_tag_block meta_tag_block_any meta_tag_block_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_block entity_name_tag_block_any entity_name_tag_block_any_html">ul</span> <span class="meta meta_attribute-with-value meta_attribute-with-value_id meta_attribute-with-value_id_html"><span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_id entity_other_attribute-name_id_html">id</span><span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_html">=</span><span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span><span class="meta meta_toc-list meta_toc-list_id meta_toc-list_id_html">pkykGlobalErrors</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>
   <span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">li</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html">class</span>=<span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span>globalErrorTitle<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>The following form information has been completed but it contains errors:<span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">li</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>
   <span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">li</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html">class</span>=<span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span>errors<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span> <span class="meta meta_attribute-with-value meta_attribute-with-value_id meta_attribute-with-value_id_html"><span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_id entity_other_attribute-name_id_html">id</span><span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_html">=</span><span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span><span class="meta meta_toc-list meta_toc-list_id meta_toc-list_id_html">pkykGlobal_username</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>Please enter your username.<span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">li</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>
   <span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">li</span> <span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_html">class</span>=<span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span>errors<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span> <span class="meta meta_attribute-with-value meta_attribute-with-value_id meta_attribute-with-value_id_html"><span class="entity entity_other entity_other_attribute-name entity_other_attribute-name_id entity_other_attribute-name_id_html">id</span><span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_html">=</span><span class="string string_quoted string_quoted_double string_quoted_double_html"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_html">"</span><span class="meta meta_toc-list meta_toc-list_id meta_toc-list_id_html">pkykGlobal_password</span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_html">"</span></span></span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>Please enter your password.<span class="meta meta_tag meta_tag_inline meta_tag_inline_any meta_tag_inline_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_inline entity_name_tag_inline_any entity_name_tag_inline_any_html">li</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span>
<span class="meta meta_tag meta_tag_block meta_tag_block_any meta_tag_block_any_html"><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_begin punctuation_definition_tag_begin_html">&lt;/</span><span class="entity entity_name entity_name_tag entity_name_tag_block entity_name_tag_block_any entity_name_tag_block_any_html">ul</span><span class="punctuation punctuation_definition punctuation_definition_tag punctuation_definition_tag_end punctuation_definition_tag_end_html">&gt;</span></span></span></pre>
<p>As each input error is corrected by the user the in-line and list errors are removed.</p>
<h2>Example configuration</h2>
<p>The code block below is an example app.yml file entry to configure the interactions of sfPokaYoke</p>
<pre class="textmate-source sunburst"><span class="source source_yaml"><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">all<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span><span class="string string_unquoted string_unquoted_yaml">
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> Example app.yml config for sfPokaYoke
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">pokayoke<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span><span class="string string_unquoted string_unquoted_yaml">
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> Turn PokaYoke on and off
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">on<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">true
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> Turn on the debuging this will cause alerts at each validation action
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">debug<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">false
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> Event hooks - validation called on both field blur and form submit
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">validate_onblur<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">true
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">validateon_submit<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">true
</span></span>
<span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> Define which events should display the inline and global form errors
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">display_inline_onblur<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">true
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">display_inline_onsubmit<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">false
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">display_global_onblur<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">false
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">display_global_onsubmit<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">false
</span></span>
<span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> Inline error id="error_for(_name)" and class="form_error"
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">inline_id_prefix<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">error_for_
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">inline_class<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">form_error
</span></span>
<span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> &amp;lt;li class="form_error"&amp;gt;&amp;lt;/li&amp;gt; the global error lost class
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">global_class<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">form_error
</span></span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> The text used to introduce the global errors list
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">global_title<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_quoted string_quoted_single string_quoted_single_yaml"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_yaml">'</span>The following form information has been completed but it contains errors:<span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_yaml">'</span></span>
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">global_titleclass<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">pkyk_global_title
</span></span>
<span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="comment comment_line comment_line_number-sign comment_line_number-sign_yaml"><span class="punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_yaml">#</span> Add an onClick event to the items in the global list - click to focus the field with the error
</span><span class="meta meta_leading-tabs meta_leading-tabs_yaml"><span class="meta meta_odd-tab">  </span><span class="meta meta_even-tab">  </span></span><span class="string string_unquoted string_unquoted_yaml"><span class="entity entity_name entity_name_tag entity_name_tag_yaml">global_onclick_focus<span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml">:</span></span> <span class="string string_unquoted string_unquoted_yaml">true;</span></span></span></pre>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=sfPokaYokePlugin+symfony+Client+Side+Validation+-+http://tr.im/Bx3R&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;title=sfPokaYokePlugin+symfony+Client+Side+Validation" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;title=sfPokaYokePlugin+symfony+Client+Side+Validation" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;title=sfPokaYokePlugin+symfony+Client+Side+Validation" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;title=sfPokaYokePlugin+symfony+Client+Side+Validation&amp;summary=The%20sfPokaYokePlugin%20%28pronounced%20with%20the%20%27e%27%20on%20the%20end%20e.g.%20poka-yoki%29.%20%20Simply%20put%20it%20is%20the%20use%20of%20simple%20mechanisms%20that%20stop%20mistakes%20being%20made.%20%20%20sfPokaYoke%20provides%20client-side%20form%20validation%20based%20on%20existing%20action.yml%20validation%20files.%20%20This%20validator%20will%20provide%20fully%20configurable%20inl&amp;source=Design Disclosure - Portfolio &amp; Personal Blog of Alistair Stead" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;title=sfPokaYokePlugin+symfony+Client+Side+Validation" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;t=sfPokaYokePlugin+symfony+Client+Side+Validation" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;title=sfPokaYokePlugin+symfony+Client+Side+Validation" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-dzone">
			<a href="http://www.dzone.com/links/add.html?url=http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/&amp;title=sfPokaYokePlugin+symfony+Client+Side+Validation&amp;description=The%20sfPokaYokePlugin%20%28pronounced%20with%20the%20%27e%27%20on%20the%20end%20e.g.%20poka-yoki%29.%20%20Simply%20put%20it%20is%20the%20use%20of%20simple%20mechanisms%20that%20stop%20mistakes%20being%20made.%20%20%20sfPokaYoke%20provides%20client-side%20form%20validation%20based%20on%20existing%20action.yml%20validation%20files.%20%20This%20validator%20will%20provide%20fully%20configurable%20inl" rel="nofollow" class="external" title="Add this to DZone">Add this to DZone</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

<h3  class="related_post_title">Related Articles</h3><ul class="related_post"><li>No Related Post</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.designdisclosure.com/2009/01/sfpokayokeplugin-symfony-client-side-validation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
