News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

ZendCasts.com:
Writing Composite Zend_Form Elements
March 15, 2010 @ 11:33:48

A recent tutorial (screencast) has been posted to the ZendCasts.com site looking at creating custom Zend_Form elements when you need something more than just the usual, simple elements.

This video should help you build your own composite Zend_Form element. We'll be building a phone element. The phone element will have 3 textboxes, one for geographic location, area code and local code. In the following videos will add a custom cell phone validator and some ajax validation.

You can grab a copy of the source if you'd like to follow along or you can just look around the repository to find the source for this and other great lessons from the site.

0 comments voice your opinion now!
composite zendform element screencast tutorial zendframework



ZendCasts.com:
Creating Custom Zend_Form Decorators
March 02, 2010 @ 11:10:52

On ZendCasts.com today there's a new screencast aimed at showing off custom Zend_Form decorators for your Zend Framework application.

This little video tutorial should set you up for building your own custom Zend_Form decorators in 15 minutes. I'll show you how you can make the necessary class and have it easily added to your existing Zend_Form_Decorator configuration.

If you'd like to follow along with the tutorial as he walks through it you can grab a copy of the source or, for other examples, look through their repository.

0 comments voice your opinion now!
zendform tutorial screencast zendframework decorator


Adrian Schneider's Blog:
Caching Zend Framework Forms
February 11, 2010 @ 11:36:10

In a new post to his blog Adrian Schneider looks at a method for caching your forms in your Zend Framework application so you don't have to recreate it every time.

Generating a form is an expensive process in ZF. It's always bugged me that I can't find any resources on trying to cache the initial HTML anywhere, so I took a stab at it myself. I use a loader from inside my controller action to load forms and models, so I found that was a good place to start.

To help solve the problem, he's created a simple loader class (maybe dropped into an action helper) that, when used will cache the form (using Zend_Cache, of course) to keep the object instance where you can get to it later. The code to implement it and to put it to good use is also included.

0 comments voice your opinion now!
cahe zendform zendframework zendcache tutorial


Adrian Schneider's Blog:
Forms in Zend Framework
February 10, 2010 @ 08:19:39

Adrian Schneider has posted a new article to his blog today looking at some of the benefits that come with using Zend_Form in your Zend Framework application.

I'm often asked what my favorite component of Zend Framework is, and I invariably answer: "Forms". Forms have always played an awkward role in the model-view-controller paradigm. Sure, the form is just HTML, but to me, it represents something more abstract than that.

He touches on a few topics like form creation (with many ways to accomplish it), filters, validators, how they can help to make skinny controllers and a few more. A few code examples are sprinkled in where there's a need for clarification.

0 comments voice your opinion now!
zendframework zendform feature


Chris Hartjes' Blog:
Creating Usable Forms With Zend Framework
January 28, 2010 @ 10:48:16

Chris Hartjes has a new post to his blog today looking at how to make forms in a Zend Framework application in a bit more reusable fashion.

After searching around online for some examples of building simple forms, I was dismayed to discover there were two different ways of building the form. I could (a) do it the long way and create specific instances of the form elements using Zend_Form_Element_X or (b) do it the short way and add them to the form by use of Zend_Form::addElement() and pass it the type of form element I want via an array. For reasons I cannot explain initially, I decided to do things the long way. Later on, I found out that doing it this way saved me from rewriting.

He includes the code for his sample form that lives in a file outside the controller so he could use it for both the "add" and "edit" actions. He shows how to plug that into the controllers, the views to show the end result and a few decorators to get rid of the default form formatting and customize it how he needed.

0 comments voice your opinion now!
zendframework form zendform reusable tutorial


Tibo Beijen's Blog:
Zend_Form Building dynamic forms
December 21, 2009 @ 13:37:22

In this new post to his blog Tibo Beijen looks at more things you can do with dynamic forms in the Zend Framework. This time he breaks the "one row to one form" link for cases of undetermined fields or when no one-to-one connection exists.

Take for example a shopping cart that shows the amounts of each product. In this article I'll take a look at how to dynamically construct a form based on the data being edited, use subforms to reuse common parts and group related values, create composite 'elements' by using the default Zend_Form_Element in combination with a custom decorator, create additional elements with Javascript and have them processed by the form when submitted.

He lays out the situation where this might be used and how to use the Zend_Form component to create more abstract objects for working with your data. He adds on a decorators to the objects to replace the ViewRenderer decorator and integrates jQuery to allow the user to add in new fields as they need them.

0 comments voice your opinion now!
zendframework dynamic form tutorial zendform


Tibo Beijen's Blog:
Using Zend_Form without Zend Framework MVC
December 07, 2009 @ 11:17:04

Tibo Beijen has a recent post to his blog about using a popular component of the Zend Framework, Zend_Form, without having to use the entire framework to get it.

Most components of Zend Framework can be used without using the entire framework and Zend_Form is no exception. It's a versatile component that can be customized to great extent. The payoff is that seemingly easy tasks can seem quite complex to complete and involve concepts like Decorators and View Helpers. Complexity is increased by the fact that most tasks can be achieved in multiple ways.

He looks at creating a Zend_Form object and using it to: create a simple email field, make a multi-checkbox, add in custom validators to each field, add decorators to the object and render it in a page.

0 comments voice your opinion now!
zendframework zendform tutorial mvc


Giorgio Sironi's Blog:
Advanced Zend_Form usage
October 22, 2009 @ 11:20:09

On his blog today Giorgio Sironi has posted a look at some advanced usage of the Zend_Form component of the Zend Framework:

If you have ever duplicated a form for editing and adding a new entity to your application, or have felt the pain to manually populate text inputs, you now know being able to reuse a form is a killer feature and in fact many php frameworks provide a form library. Today I have gathered from my experience some know-how I have learnt while taking the Zend_Form component to its limits.

He talks about decorators, ignored elements, subforms, the Dojo javascript functionality and the captcha feature of the Zend_Form component.

0 comments voice your opinion now!
zendform advanced tutorial usage


Content with Style:
Custom Zend Form Image Upload Element
June 29, 2009 @ 22:20:06

On the Content with Style blog Pascal Opitz looks at creating a custom Zend form element for uploading images.

It really is time to post something, isn't it? Here is a quick way to have an image preview inside of a form based on Zend Form. I am using the auto include mechanism for this one, utilizing the PEAR naming convention, and all my files will sit underneath a Shared folder within the library folder.

Their custom element is created in a two pieces - the form element itself and a custom view helper to define how the form element is displayed. An example of its use is also included.

0 comments voice your opinion now!
tutorial upload image custom zendform zendframework


Rich Buggy's Blog:
Dynamic forms using Zend_Form
June 24, 2009 @ 12:05:24

Rich Buggy has posted a new tutorial to his blog looking at the Zend_Form component of the Zend Framework and how you can have it cooperate with the generation of more dynamic forms.

While most forms contain fixed fields there are occasions when you need a form to be dynamic and adjust itself based on user input. The adjustment could be as simple as altering the options in a drop down list or as complex as adding/removing fields. In this post I'm going to cover how to create a dynamic form using Zend_Form and jQuery. I'll use the example of a registration form that prompts the user for their country and state.

He extends the Zend_Form component to make his own registration form with two fields - country and state. Combined with the jQuery code to pull in the JSON formatted state information, the form updates the States list as the country is selected. Complete code is provided.

0 comments voice your opinion now!
json jquery zendform zendframework



Community Events









Don't see your event here?
Let us know!


job extension microsoft sqlserver podcast drupal opinion feature windows conference developer release codeigniter symfony wordpress zendframework performance zend facebook framework

All content copyright, 2010 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework