Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Symfony 1.3 Web Application Development

You're reading from   Symfony 1.3 Web Application Development Design, develop, and deploy feature-rich, high-performance PHP web applications using the Symfony framework

Arrow left icon
Product type Paperback
Published in Sep 2009
Publisher Packt
ISBN-13 9781847194565
Length 228 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (15) Chapters Close

Symfony 1.3 Web Application Development
Credits
About the Authors
About the Reviewer
1. Preface
1. Getting Started with Symfony 2. Developing Our Application FREE CHAPTER 3. Adding the Business Logic and Complex Application Logic 4. User Interaction and Email Automation 5. Generating the Admin Area 6. Advanced Forms and JavaScript 7. Internationalizing our Global Positions 8. Extending Symfony 9. Optimizing for Performance 10. Final Tweaks and Deployment

Autocompleting the search


To demonstrate how simple it is to use the JavaScript form widgets, we are going to add an autocomplete search form at the top of the menu page. After a user starts typing in the search box, results will be displayed on key up even before he/she clicks on the "search" button.

To complete this task, we will use a widget called sfWidgetFormPropelJQueryAutocompleter. This widget is very useful when we are dealing with a Propel object and need an autocomplete feature.

First, we need to create a new search form. Create the lib/form/MilkshakeSearchForm.class.php file and add the following code to it:

<?php
class MilkshakeSearchForm extends sfForm
{
public function configure()
{
$this->setWidgets(array 
('url_slug' => new sfWidgetFormChoice(array 
('choices' => array(),'renderer_class' => '
sfWidgetFormJQueryAutocompleter',
'renderer_options' => 
array('url' => '/menu/search',),
))
));
$this->widgetSchema->setFormFormatterName('div');
}
}
?...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Symfony 1.3 Web Application Development
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon