<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Zebra_Form, a jQuery augmented PHP library for creating and validating HTML forms</title>
	<atom:link href="http://stefangabos.ro/php-libraries/zebra-form/feed/" rel="self" type="application/rss+xml" />
	<link>http://stefangabos.ro</link>
	<description>web developer extraordinaire</description>
	<lastBuildDate>Sun, 16 Jun 2013 08:43:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Stefan Gabos</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3831</link>
		<dc:creator>Stefan Gabos</dc:creator>
		<pubDate>Sun, 16 Jun 2013 06:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3831</guid>
		<description><![CDATA[i just gave up on using actual urls because it caused a lot of problems, so that is something that i will not change. but i will add an option for disabling client-side validation for file uploads and maybe will have it in the next release. thank you!]]></description>
		<content:encoded><![CDATA[<p>i just gave up on using actual urls because it caused a lot of problems, so that is something that i will not change. but i will add an option for disabling client-side validation for file uploads and maybe will have it in the next release. thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ssekirime</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3820</link>
		<dc:creator>Ssekirime</dc:creator>
		<pubDate>Fri, 14 Jun 2013 10:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3820</guid>
		<description><![CDATA[Thanks for the reply, I unbound if from the onChange however it would throw an error when it ran fileype validation since it still didn&#039;t have the mimes (mime.json). I just decided to do some havoc insted (i.e i replace the url to the ajax call with something my app could process and it worked quite fine, i feel bad that i had interfere with the source, sorry for that, however i would be glad if in your next release the js api allowed the user to specify the actual urls (rather than just relative paths i.e assets_path) to consider for the backend process.php and mime.json i think it would permit some bit of flexibility at that front, thanks]]></description>
		<content:encoded><![CDATA[<p>Thanks for the reply, I unbound if from the onChange however it would throw an error when it ran fileype validation since it still didn&#8217;t have the mimes (mime.json). I just decided to do some havoc insted (i.e i replace the url to the ajax call with something my app could process and it worked quite fine, i feel bad that i had interfere with the source, sorry for that, however i would be glad if in your next release the js api allowed the user to specify the actual urls (rather than just relative paths i.e assets_path) to consider for the backend process.php and mime.json i think it would permit some bit of flexibility at that front, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bayron Pantoja</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3814</link>
		<dc:creator>Bayron Pantoja</dc:creator>
		<pubDate>Thu, 13 Jun 2013 04:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3814</guid>
		<description><![CDATA[Stefan,
Find the solution everywhere, but I could not find it, I wanted to know if what I&#039;m looking for can be done with ZebraForm.
Thank you so much.

regards
-
Bayron]]></description>
		<content:encoded><![CDATA[<p>Stefan,<br />
Find the solution everywhere, but I could not find it, I wanted to know if what I&#8217;m looking for can be done with ZebraForm.<br />
Thank you so much.</p>
<p>regards<br />
-<br />
Bayron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jools</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3811</link>
		<dc:creator>Jools</dc:creator>
		<pubDate>Wed, 12 Jun 2013 12:23:42 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3811</guid>
		<description><![CDATA[I have a file upload. after selecting a file, the &quot;spinner&quot; is shown, but stays as is. submitting the form works, and the file gets uploaded, but i assume it&#039;s supposed to be uploaded while the spinner is shown before the form submission is complete?

Please feel free to contact me directly should you want to see any of the code etc. I am running 2.9.3b - there are no javascript errors logged.]]></description>
		<content:encoded><![CDATA[<p>I have a file upload. after selecting a file, the &#8220;spinner&#8221; is shown, but stays as is. submitting the form works, and the file gets uploaded, but i assume it&#8217;s supposed to be uploaded while the spinner is shown before the form submission is complete?</p>
<p>Please feel free to contact me directly should you want to see any of the code etc. I am running 2.9.3b &#8211; there are no javascript errors logged.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kszys</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3809</link>
		<dc:creator>kszys</dc:creator>
		<pubDate>Wed, 12 Jun 2013 10:35:22 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3809</guid>
		<description><![CDATA[Works like a charm! Thank you very much! I thought for some reason that the value would in fact be passed in the argument to the custom validation function ;)]]></description>
		<content:encoded><![CDATA[<p>Works like a charm! Thank you very much! I thought for some reason that the value would in fact be passed in the argument to the custom validation function <img src='http://stefangabos.ro/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Gabos</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3808</link>
		<dc:creator>Stefan Gabos</dc:creator>
		<pubDate>Wed, 12 Jun 2013 09:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3808</guid>
		<description><![CDATA[I don&#039;t offer support for things related to general programming, be that JS or PHP, other than what&#039;s strictly related to my libraries. Nevertheless, here is what you&#039;re probably looking for:

&lt;pre&gt;&lt;code&gt;function is_valid_combination(value) {

  var checked_values = [];

  $(&#039;input[name=&quot;scope[]&quot;]:checked&#039;).each(function(){
    checked_values.push($(this).val());
  });

  if (
    // return true only if first and last option are selected
    $([&#039;0&#039;, &#039;3&#039;]).not(checked_values).get().length == 0 &amp;&amp;
    $(checked_values).not([&#039;0&#039;, &#039;3&#039;]).get().length == 0
  ) return true;

  return false;

}&lt;/code&gt;&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t offer support for things related to general programming, be that JS or PHP, other than what&#8217;s strictly related to my libraries. Nevertheless, here is what you&#8217;re probably looking for:</p>
<pre><code>function is_valid_combination(value) {

  var checked_values = [];

  $('input[name="scope[]"]:checked').each(function(){
    checked_values.push($(this).val());
  });

  if (
    // return true only if first and last option are selected
    $(['0', '3']).not(checked_values).get().length == 0 &amp;&amp;
    $(checked_values).not(['0', '3']).get().length == 0
  ) return true;

  return false;

}</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: kszys</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3807</link>
		<dc:creator>kszys</dc:creator>
		<pubDate>Wed, 12 Jun 2013 08:44:33 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3807</guid>
		<description><![CDATA[Thank you for a quick response... However, this does not really answer my question (or maybe I ask the wrong question). I have a single &quot;checkboxes&quot; control with four checkboxes, to which I attach a custom validation rule. 

&lt;pre&gt;&lt;code&gt;$form-&gt;add(&#039;label&#039;,&#039;label_scope&#039;,&#039;scope&#039;,&#039;Scope:&#039;);
$obj = &amp; $form-&gt;add(&#039;checkboxes&#039;,&#039;scope[]&#039;,
  array(
    &#039;v1&#039;,
    &#039;v2&#039;,
    &#039;v3&#039;,
    &#039;v4&#039;
  )
);
$obj-&gt;set_rule(array(
  &#039;required&#039;  =&gt;  array(&#039;error&#039;, &#039;Error!&#039;),
  &#039;custom&#039;    =&gt;  array(
    &#039;is_valid_combination&#039;,
    &#039;error&#039;,
    &#039;Error!&#039;
  )
));&lt;/code&gt;&lt;/pre&gt;

This custom validation function receives only one value (or so it appears to me):

&lt;pre&gt;&lt;code&gt;function is_valid_combination(value) {
  // return false if the combination is not allowed, e.g., v1 and v3 only
  return true;
}&lt;/code&gt;&lt;/pre&gt;

Now - how do I get in this JavaScript custom validation rule the actual checkboxes that were checked?]]></description>
		<content:encoded><![CDATA[<p>Thank you for a quick response&#8230; However, this does not really answer my question (or maybe I ask the wrong question). I have a single &#8220;checkboxes&#8221; control with four checkboxes, to which I attach a custom validation rule. </p>
<pre><code>$form-&gt;add('label','label_scope','scope','Scope:');
$obj = &amp; $form-&gt;add('checkboxes','scope[]',
  array(
    'v1',
    'v2',
    'v3',
    'v4'
  )
);
$obj-&gt;set_rule(array(
  'required'  =&gt;  array('error', 'Error!'),
  'custom'    =&gt;  array(
    'is_valid_combination',
    'error',
    'Error!'
  )
));</code></pre>
<p>This custom validation function receives only one value (or so it appears to me):</p>
<pre><code>function is_valid_combination(value) {
  // return false if the combination is not allowed, e.g., v1 and v3 only
  return true;
}</code></pre>
<p>Now &#8211; how do I get in this JavaScript custom validation rule the actual checkboxes that were checked?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Gabos</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3805</link>
		<dc:creator>Stefan Gabos</dc:creator>
		<pubDate>Wed, 12 Jun 2013 07:51:57 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3805</guid>
		<description><![CDATA[You might have a restrictive cookie policy in place and thus the session cannot be stored in one.
Try setting the &lt;a href=&quot;http://stefangabos.ro/wp-content/docs/Zebra_Form/Zebra_Form/Zebra_Form.html#methodcaptcha_storage&quot; rel=&quot;nofollow&quot;&gt;captcha storage method&lt;/a&gt; to &quot;session&quot;]]></description>
		<content:encoded><![CDATA[<p>You might have a restrictive cookie policy in place and thus the session cannot be stored in one.<br />
Try setting the <a href="http://stefangabos.ro/wp-content/docs/Zebra_Form/Zebra_Form/Zebra_Form.html#methodcaptcha_storage" rel="nofollow">captcha storage method</a> to &#8220;session&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Gabos</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3804</link>
		<dc:creator>Stefan Gabos</dc:creator>
		<pubDate>Wed, 12 Jun 2013 07:49:54 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3804</guid>
		<description><![CDATA[maybe try it like this?
&lt;pre&gt;&lt;code&gt;$obj-&gt;set_rule(
  &#039;dependencies&#039; =&gt; array(array(
    &#039;my_checkboxes&#039; =&gt; array(&#039;value_1&#039;, &#039;value_2&#039;),
  ), &#039;mycallback&#039;),
);&lt;/code&gt;&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>maybe try it like this?</p>
<pre><code>$obj->set_rule(
  'dependencies' => array(array(
    'my_checkboxes' => array('value_1', 'value_2'),
  ), 'mycallback'),
);</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: kszys</title>
		<link>http://stefangabos.ro/php-libraries/zebra-form/comment-page-24/#comment-3803</link>
		<dc:creator>kszys</dc:creator>
		<pubDate>Wed, 12 Jun 2013 07:43:25 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=649#comment-3803</guid>
		<description><![CDATA[Thank for the pointer. Actually, I have :) This does seem very simple indeed for a single checkbox. However, I have a problem how to deal with multiple &quot;checkboxes&quot;... I have actually four, and I want to allow only some combinations... The value of the four checkboxes clearly cannot be simple true/false... I presume this should be some kind of an array of values, but having limited experience with JavaScript, I cannot figure out how to refer to those values...]]></description>
		<content:encoded><![CDATA[<p>Thank for the pointer. Actually, I have <img src='http://stefangabos.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This does seem very simple indeed for a single checkbox. However, I have a problem how to deal with multiple &#8220;checkboxes&#8221;&#8230; I have actually four, and I want to allow only some combinations&#8230; The value of the four checkboxes clearly cannot be simple true/false&#8230; I presume this should be some kind of an array of values, but having limited experience with JavaScript, I cannot figure out how to refer to those values&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
