Dojo
Add A Cool Zend Dojo Date Picker Form Element Without Writing A Single Line Of JavaScript
Submitted by Sudheer on Sun, 09/21/2008 - 16:44.Zend Framework users know that Dojo toolkit is integrated to 1.6+ release. In the previous post I demonstrated how to add a cool Dojo date picker widget to your text input form element by manually typing the JavaScript code. In this post let us discover how to create a cool date picker form element with Zend_Dojo. As the title says you don't have to write a single line of JavaScript. Zend_Dojo does all the work for you.
Prerequisite: you are familiar with Zend_Form, Zend_Controller and Zend_Layout.
Bootstrap: Zend Framework comes with many Dojo specific view helpers. You have to instruct the view object to find Dojo view helpers.
Grab the view object and add the following line in your bootstrap file.
<?php
// Create new view object if not already instantiated
//$view = new Zend_View();
Zend_Dojo::enableView($view);
?>Add A Cool Date Picker With 2 Lines Of JavaScript
Submitted by Sudheer on Sun, 09/14/2008 - 16:40.
We have all seen drop down date pickers in web pages that are really convenient for the user. Let us see how we can build one with just 2 lines of JavaScript code. Yes, you read it right. 2 lines of JavaScript. You don't even have to know JavaScript to build a date picker in your web page.
For the impatient: Demo is here
Before: Traditional HTML form with input field
Visit the above link and take a look at the HTML only form fields that collect date information from the user. If you don't use a server side scripting language to generate the form fields you have to type a lot of select options to make it easier for the user. Populating the select fields with the desired option, especially in the case of failed validation, takes a bit more server side code. Most of you would agree that the user hates these kind of forms.
Recent comments
6 days 5 hours ago
6 days 9 hours ago
1 week 1 day ago
1 week 1 day ago
1 week 2 days ago
1 week 3 days ago
1 week 3 days ago
1 week 4 days ago
2 weeks 2 hours ago
2 weeks 2 days ago