<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 12 Feb 2012 20:52:24 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jason Gilmore's Blog: How I Learned to Stop Worrying and Love Zend_Form]]></title>
      <guid>http://www.phpdeveloper.org/news/16753</guid>
      <link>http://www.phpdeveloper.org/news/16753</link>
      <description><![CDATA[<p>
On his blog today <i>Jason Gilmore</i> has a quick post about <a href="http://www.wjgilmore.com/blog/entry/how_i_learned_to_stop_worrying_and_love_zend_form">solving one of his frustrations with Zend_Form</a> (a part of the <a href="http://framework.zend.com">Zend Framework</a>) - the default form decorators.
</p>
<blockquote>
It is a fantastically productive framework, one which I happen to use almost every single day. There was however one feature which absolutely drove me crazy. The Zend_Form component's uses the dd, dl, and dt elements as the default form markup decorators, meaning that even a simple contact form consisting of name, email, and message fields and a submit button [is marked up with dl, dt and dds]. [...]  It goes without saying that the overwhelming majority of developers do not use these elements to mark up their forms, with the sheer number of questions posted to StackOverflow and elsewhere about getting rid of these decorators backing this assertion.
</blockquote>
<p>
He gives his simple solution to the issue, something better than removing all of the decorators and using <a href="http://framework.zend.com/manual/en/zend.form.decorators.html">setDecorator</a> to replace them - a simple partial view that echos out the fields directly. The trick is to use the setDecorators call with a "ViewScript" option pointing to your partial and  setElementDecorators() call to use a "ViewHelper".
</p>]]></description>
      <pubDate>Mon, 22 Aug 2011 13:57:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's' Blog: A Zend Framwork compound form element for dates]]></title>
      <guid>http://www.phpdeveloper.org/news/16075</guid>
      <link>http://www.phpdeveloper.org/news/16075</link>
      <description><![CDATA[<p>
In a new post to his blog today <i>Rob Allen</i> shows you how to create <a href="http://akrabat.com/zend-framework/a-zend-framwork-compount-form-element-for-dates/">compound form element handling</a> in a Zend Framework application thanks to some custom work with Zend_Form and Zend_View extensions.
</p>
<blockquote>
A little bit of googling found this site <a href="http://codecaine.co.za/posts/compound-elements-with-zend-form">http://codecaine.co.za/posts/compound-elements-with-zend-form</a> which has not unfortunately disappeared, so the code in this article owes a lot of the author of that article. It turns out to be remarkably simple to create a single Zend Form element that is rendered as multiple form elements. We create an element object and a view helper object and we're done. 
</blockquote>
<p>
He shows how to create a custom form date helper that extends the base XHTML to create the isValid/getValue methods for handling the complex date input. There's also the code for the view that creates the <a href="http://akrabat.com/wp-content/uploads/2011-03-Screen-shot-2011-03-08-at-20.45.03.png">custom date input</a> and repopulates the content if there's a need.
</p>]]></description>
      <pubDate>Mon, 21 Mar 2011 12:23:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings techPortal: DPCRadio: Working with Zend_Form]]></title>
      <guid>http://www.phpdeveloper.org/news/15809</guid>
      <link>http://www.phpdeveloper.org/news/15809</link>
      <description><![CDATA[<p>
On the Ibuildings techPortal today they've posted the latest episode in their DPCRadio podcast series (as recorded at the <a href="http://phpconference.nl">Dutch PHP Conference 2010</a>) - a talk from <i>Rob Allen</i> about <a href="http://techportal.ibuildings.com/2011/01/26/dpcradio-working-with-zend_form/">working with Zend_Form</a> (from the Zend Framework).
</p>
<blockquote>
<p>
Zend_Form is a powerful component than can simplify form handling within your web application. Find out in this session how to make Zend_Form render and validate your form elements and ease the pain of forms on web pages.
</p>
<p>
We will look at configuration, data filters & validation and error handling. One particularly tricky area is the use of the decorator pattern to control the generated HTML when rendering the form. This session will therefore also take a detailed look at this especially powerful functionality and show how to ensure that your forms are rendered as desired.
</p>
</blockquote>
<p>
To listen you can either use the <a href="http://techportal.ibuildings.com/2011/01/26/dpcradio-working-with-zend_form/">in-page player</a> or you can <a href="http://dpcradio.s3.amazonaws.com/2010_015.mp3">download the (rather large) mp3</a> to listen at your leisure. The slides for the talk can be found <a href="http://akrabat.com/talks/#zendform">here</a>.
</p>]]></description>
      <pubDate>Wed, 26 Jan 2011 10:08:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Validating dates]]></title>
      <guid>http://www.phpdeveloper.org/news/15405</guid>
      <link>http://www.phpdeveloper.org/news/15405</link>
      <description><![CDATA[<p>
In a new Zend Framework related post to his blog today <i>Rob Allen</i> takes a look at <a href="http://akrabat.com/zend-framework/validating-dates/">a different operating mode he found with Zend_Date</a> changing how it handles format specifiers.
</p>
<blockquote>
I discovered recently that Zend Framework 1's Zend_Date has two operating modes when it comes to format specifiers: iso and php, where iso is the default. When using Zend_Validate_Date in forms, I like to use the php format specifiers as they are what I'm used to and so can easily know what they mean when reviewing code that I wrote months ago.
</blockquote>
<p>
His example code shows how you can use the standard <a href="http://php.net/date">date</a> formatting strings in a Zend_Form validator (the "php" format) and an example using the Zend_Date::MONTH or Zend_Date::YEAR identifiers (the "iso" format). He also shows how he met two other requirements - validation for empty and a consistent format on the date validation ("Y-m-d").
</p>]]></description>
      <pubDate>Tue, 09 Nov 2010 12:11:12 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: Unit Testing Zend_Form]]></title>
      <guid>http://www.phpdeveloper.org/news/15317</guid>
      <link>http://www.phpdeveloper.org/news/15317</link>
      <description><![CDATA[<p>
On the ZendCasts.com site today there's <a href="http://www.zendcasts.com/unit-testing-zend_form/2010/10/">a new screencast posted</a> about using the unit testing functionality that comes with the Zend Framework to unit test your Zend_Form instance.
</p>
<blockquote>
This screencast will show you how to build a form for changing user passwords with 100% code coverage.
</blockquote>
<p>
To follow along you can <a href="http://code.google.com/p/zendcasts/source/browse/trunk/zc63-unit-testing-zend-form">download the source code</a> for this specific example or the <a href="http://zendcasts.googlecode.com/svn/trunk/zc63-unit-testing-zend-form/zc63-unit-testing-zend-form.zip">entire project</a> to see how it all fits in. If you're interested in other unit testing related topics, see their <a href="http://www.zendcasts.com/tag/unit-testing/">unit testing section</a>.
</p>]]></description>
      <pubDate>Thu, 21 Oct 2010 07:35:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[AjaxRay.com: Extending Zend Form Element to create customized Phone number field]]></title>
      <guid>http://www.phpdeveloper.org/news/15063</guid>
      <link>http://www.phpdeveloper.org/news/15063</link>
      <description><![CDATA[<p>
On the AjaxRay.com site today there's <a href="http://www.ajaxray.com/blog/2010/08/25/extending-zend-form-element-for-customized-phone-number/">a new tutorial</a> for the Zend Framework users out there with a library they can use to extend Zend_Form for custom phone number fields.
</p>
<blockquote>
When taking Phone number as user input, we can worn users about phone number format by setting a hint/description and can validate using Regular Expression. [...] Now, if we try provide this feature in Zend Form, that's possible. We can create three individual Zend_Form_Element_Text objects and join there value together to make the phone number. But, in this case, validating them together is a hassle.
</blockquote>
<p>
Instead of separate fields, <a href="http://www.ajaxray.com/blog/downloads/Zend_Form_Element_Phone">the library</a> they create makes it simple to handle them as a whole field. It works as a helper for Zend_Form and lets you set things like the separator between the text fields, a "format" string and a validator to apply to their fields (in the example code, it's the "digits" validator). Sample code is included to show you how it fits in your form.
</p>]]></description>
      <pubDate>Thu, 02 Sep 2010 08:05:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Zienert's Blog: Zend_Form Decorators and Composite Elements]]></title>
      <guid>http://www.phpdeveloper.org/news/14692</guid>
      <link>http://www.phpdeveloper.org/news/14692</link>
      <description><![CDATA[<p>
<i>Rob Zienert</i> has a new post to his blog today looking at <a href="http://robzienert.com/2010/06/22/zend_form-decorators-and-composite-elements/">Zend_Form decorators and composite elements</a> to make for more powerful forms in your Zend Framework application.
</p>
<blockquote>
Today had quite a number of Zend_Form-related questions in #zftalk. Everything from Decorators to Composite Elements, you know - the usual Zend_Form questions. What better way to answering questions than with a blog post and some sample code?
</blockquote>
<p>
His illustration of decorators shows how to put each of the form elements inside of a "DI" tag to help makes the lives of the frontend developers that much simpler. For the composite elements he shows how to use them to group a set of selects into one object that is then validated through Zend_Date for valid date information. You can grab the code for each of these illustrations from <a href="http://github.com/robzienert/ZFTutorials/tree/feature/form-decorators">this account</a> on Github
</p>]]></description>
      <pubDate>Wed, 23 Jun 2010 12:50:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Honeypot for Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/14389</guid>
      <link>http://www.phpdeveloper.org/news/14389</link>
      <description><![CDATA[<p>
<i>Robert Basic</i> has posted <a href="http://robertbasic.com/blog/honeypot-for-zend-framework/">a port of a WordPress plugin</a> that helps you easily make <a href="http://matthewturland.com/2010/01/01/im-a-honey-pot/">a "honeypot" in your Zend Framework form</a> to help keep the spam bots out.
</p>
<blockquote>
I just hacked up a little code snippet based on Matthew's Honeypot Wordpress plugin. It's basically just a Validator for a Zend Form element which is hidden from the user via CSS. Cause it's hidden, users won't see it, but spambots will, well, cause they are bots.
</blockquote>
<p>
The code snippet is included in the post for your cut & pasting pleasure and makes using it as easy as a normal "addElement" call when building your form.
</p>]]></description>
      <pubDate>Wed, 21 Apr 2010 14:58:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: Ajaxify Your Zend_Form Validation with jQuery]]></title>
      <guid>http://www.phpdeveloper.org/news/14332</guid>
      <link>http://www.phpdeveloper.org/news/14332</link>
      <description><![CDATA[<p>
New from ZendCasts.com there's a screencast that will help you <a href="http://www.zendcasts.com/ajaxify-your-zend_form-validation-with-jquery/2010/04/">ajaxify your Zend_Form instance</a> with the help of <a href="http://jquery.com">jQuery</a>.
</p>
<blockquote>
We're going to take what was put together in the last 3 videos and now include some server-side validation that will appear asynchronously. This is an example of using Zend_Form as a validation tool via JSON.
</blockquote>
<p>Here's the last three videos if you need to catch up:</p>
<ul>
<li><a href="http://www.zendcasts.com/encapsulating-business-rules-with-zend_validate/2010/03/">Encapsulating Business Rules with Zend_Validate</a>
<li><a href="http://www.zendcasts.com/preparing-custom-elements-for-zend-validators/2010/03/">Preparing Custom Elements for Zend Validators</a>
<li><a href="http://www.zendcasts.com/writing-composite-zend_form-elements/2010/03/">Writing Composite Zend_Form Elements</a>
</ul>
<p>
If you'd like to follow along with this most recent screencast, though, you can <a href="http://zendcasts.googlecode.com/svn/trunk/zc52-ajaxify-your-validation-with-jquery/zc52-ajaxify-your-validation-with-jquery.zip">download the source</a> directly.
</p>]]></description>
      <pubDate>Mon, 12 Apr 2010 09:17:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: "U R Doin It Wrong" - Adventures with flexible forms in Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/14230</guid>
      <link>http://www.phpdeveloper.org/news/14230</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Chris Hartjes</i> has written about his <a href="http://www.littlehart.net/atthekeyboard/2010/03/19/u-r-doin-it-wrong-adventures-with-flexible-forms-in-zend-framework">(mis)adventures with Zend_Form</a>, a powerful but sometimes difficult to use component of the Zend Framework.
</p>
<blockquote>
<a href="http://framework.zend.com/manual/en/zend.form.html">Zend_Form</a> is a super-powerful, force-of-nature tool. By force-of-nature I mean it does all this crazy stuff, and you can see it doing it, but I am not alone in admitting that taming it sometimes is very difficult. When building tools to make form programatically you either severely limit peoples options or make it so flexible that there are multiple ways to get something done.
</blockquote>
<p>
Because the Zend Framework "treats you like an adult" it can be difficult to get just what you want from it (ease of use isn't quite top of the list). In this case, <i>Chris</i> wanted a relatively simple form that did some checking before it successfully submitted. Over and over the form passed without him being able to tell why - the solution was a pretty simple one, though - be sure to create all form elements before you do validation.
</p>
<p>
He includes some same code - a "before" and "after" for the solution.]]></description>
      <pubDate>Tue, 23 Mar 2010 08:58:40 -0500</pubDate>
    </item>
  </channel>
</rss>

