Zend Framework Form: A simple but complete Zend_Form sample/tutorial

27 Jun

A sample application can be found here“.

Sorry this blog is deprecated.

“Please read complete tutorial here.” http://zendgeek.blogspot.com/2009/07/zend-framework-formzendform-tutorial.html

I got “The Zahir”, a novel by Paula Coelho about a month back, very sweat one and highly intrigued. It was highly entertaining and most importantly author shared his experiences in a nice way. I learned plenty of new ideas.

Eh, you may think that I am insane, supposed to write about Zend Framework, but discussing a novel.

Well, novel can not only be a good companion of yours, but it also put shade of light on simple things from many angles. This make you think dynamically.

If you are solving a puzzle or implementing your logic, do not think straight forward, give multiple tries and chose a more appropriate solution. Solving a problem will not be hard. You should chose a solution that require less code, small maintenance overhead and most importantly one that will be less resource intensive.

Now lets stick to the topic and discuss how you can use Zend_Form component for creating html form easily, handling filters and errors messages and how to see how easily you can fetch data from the data source and present that in html form and let the visitors change/modify the existing data and save changes to the data source.

I am gona break this topic in three steps.

1. Creating Zend_Form

Although I’ve already discussed creation of Zend_Form in some of my articles but it will be better to discuss it here again.

Creating Zend form is simple is this.

<?php

class CustomForm extend Zend_Form

{

public function init()

{

}

}

defined a class by extending it from Zend_Form. This allow access to many of methods already defined in Zend_Form.

The only thing you need to do is to override init() method and create your own element such as input box, select statement, checkboxes, radio buttons and so on.

Sorry this blog is deprecated.

“Please read complete tutorial here.” http://zendgeek.blogspot.com/2009/07/zend-framework-formzendform-tutorial.html

One Response to “Zend Framework Form: A simple but complete Zend_Form sample/tutorial”

Trackbacks/Pingbacks

  1. Zend Framework Form: A simple but complete Zend_Form sample/tutorial | Webmaster resources - July 18, 2009

    […] View original here:  Zend Framework Form: A simple but complete Zend_Form sample/tutorial […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: