<?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>{5} Setfive - Talking to the World &#187; forms</title>
	<atom:link href="http://shout.setfive.com/tag/forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://shout.setfive.com</link>
	<description></description>
	<lastBuildDate>Wed, 18 Jan 2012 21:09:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Toggle non-consecutive checkboxes with jQuery UI</title>
		<link>http://shout.setfive.com/2011/12/27/toggle-non-consecutive-checkboxes-with-jquery-ui/</link>
		<comments>http://shout.setfive.com/2011/12/27/toggle-non-consecutive-checkboxes-with-jquery-ui/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 16:19:38 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1272</guid>
		<description><![CDATA[You&#8217;re all probably familiar with the UI convention of allowing users to select ALL or NONE for a list of checkboxes (like in Gmail). Recently I was working on a project that had a large table full of checkboxes (imagine a 10&#215;10 grid) where the user would need to toggle some but not all of [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re all probably familiar with the UI convention of allowing users to select ALL or NONE for a list of checkboxes (like in Gmail). Recently I was working on a project that had a large table full of checkboxes (imagine a 10&#215;10 grid) where the user would need to toggle some but not all of the checkboxes in a given row. And to make matters more complex, they would need to toggle groups of non-consecutive checkboxes (say 15, skip 10, 5, etc.). I threw on the thinking cap but couldn&#8217;t think of any similar interactions I&#8217;d seen and couldn&#8217;t think of a particularly good way to achieve this.</p>
<p><strong>Enter jQuery UI</strong>. I happened to stumble across the jQuery UI Selectable documentation and realized it would provide a good UI experience to toggle some but not all of the checkboxes. The code to implement this is surprisingly simple:</p>
<p><strong>Note: You don&#8217;t actually need the div container &#8211; that was just for JSFiddle.</strong></p>
<pre name="code" class="php">
&lt;div id=&quot;checkboxes&quot;&gt;

&lt;table id=&quot;checkboxTable&quot;&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
</pre>
<p>And then the Javascript (jQuery + jQuery UI):</p>
<pre name="code" class="php">
$("#checkboxes").selectable( {filter: "input:checkbox",
            stop: function(event, ui) {

                $(".ui-selected").each( function(){

                    $(this).each( function(){
                        var val = $(this).attr("checked") ? null : "checked";
                        $(this).attr("checked", val);
                    });

                });
}});
</pre>
<p>You can check out a live demo at <a href="http://jsfiddle.net/whMyQ/3/" target="_blank">http://jsfiddle.net/whMyQ/3/</a></p>
<p>As always, questions and comments are welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2011/12/27/toggle-non-consecutive-checkboxes-with-jquery-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Received problem 2 in the chunky parser</title>
		<link>http://shout.setfive.com/2010/12/26/received-problem-2-in-the-chunky-parser/</link>
		<comments>http://shout.setfive.com/2010/12/26/received-problem-2-in-the-chunky-parser/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 00:32:01 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[php code]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=507</guid>
		<description><![CDATA[I was using cURL in PHP to POST some data to a URL earlier tonight and ran into this problem. With VERBOSE on cURL was erroring with the following error: "Received problem 2 in the chunky parser" After some Googling it turns out this is a problem with how some servers respond with chunked encoding. [...]]]></description>
			<content:encoded><![CDATA[<p>I was using cURL in PHP to POST some data to a URL earlier tonight and ran into this problem.</p>
<p>With VERBOSE on cURL was erroring with the following error:</p>
<pre name="code" class="php">
"Received problem 2 in the chunky parser"
</pre>
<p>After some Googling it turns out this is a problem with how some servers respond with chunked encoding.</p>
<p>A simple fix for this is to set the HTTP version cURL is using to 1.0:</p>
<pre name="code" class="php">
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0 )
</pre>
<p>It&#8217;s not pretty but hey it works!</p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2010/12/26/received-problem-2-in-the-chunky-parser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rich Date Input Widget for Symfony 1.1 Forms</title>
		<link>http://shout.setfive.com/2008/09/14/rich-date-input-widget-for-symfony-11-forms/</link>
		<comments>http://shout.setfive.com/2008/09/14/rich-date-input-widget-for-symfony-11-forms/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 01:55:33 +0000</pubDate>
		<dc:creator>Matt Daum</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[date form widget]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[rich date input widget]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[symfony forms]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=27</guid>
		<description><![CDATA[I noticed that for some reason the 1.1 forms do not allow for the rich date input that many people like to use, so I just created a new widget that allows for rich date input. See below for the widget&#8217;s code. It uses the input_date_tag widget in the &#8216;Form&#8217; helper. /** * myWidgetFormRichDate is [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed that for some reason the 1.1 forms do not allow for the rich date input that many people like to use, so I just created a new widget that allows for rich date input. See below for the widget&#8217;s code. It uses the input_date_tag widget in the &#8216;Form&#8217; helper.</p>
<pre class="php" name="code">
/**
* myWidgetFormRichDate is a rich date widget for 1.1+ forms
*
* @author Matt Daum matt [at] setfive.com
*/
class myWidgetFormRichDate extends sfWidgetFormDate
{

  /**
  * @param array $options An array of options
  * @param array $attributes An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
  protected function configure($options = array(), $attributes = array())
  {
    parent::configure($options, $attributes);
  }

  /**
  * @param string $name The element name
  * @param string $value The value displayed in this widget
  * @param array $attributes An array of HTML attributes to be merged with the default HTML attributes
  * @param array $errors An array of errors for the field
  *
  * @return string An HTML tag string
  *
  * @see sfWidgetForm
  */
  public function render($name, $value = null, $attributes = array(), $errors = array())
  {
    //Get the date input function from Form helper
    use_helper('Form');
    //Make the widget rich
    $attributes['rich']=true;
    return input_date_tag($name,$value, $attributes);
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2008/09/14/rich-date-input-widget-for-symfony-11-forms/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

