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

Customizing the rendering of the form


Till now the rendering of forms has all been handled by the default rendering method. From a prototype point of view, this method has allowed us to create a nice, clean form. The only problem we now face is that there are situations where this rendering is not flexible enough.

To render the form, we have been echoing the $form object in the template. This, in fact, is a shortcut to $form->render(). However, there are several rendering functions available for use. We will be using these to customize our form on the template further. To demonstrate this, I will apply these functions to the email field before presenting to you the final version.

The email section of the form can be broken up into three areas: the label, the form field, and the error message. We are going to use three of the rendering functions to completely customize the email section:

  • Setting a label: For setting the label, we can use the $form['email']->renderLabel() function....

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 ₹800/month. Cancel anytime
Modal Close icon
Modal Close icon