News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ian Christian's Blog:
Embedded forms using Javascript with sfForm
November 13, 2009 @ 10:03:37

In this recent post to his blog Ian Christian looks at how to use the sfForm component of the Symfony framework to create dynamic sub-forms without a refresh to build it.

wanted to create a form that allowed me to dynamically add sub-forms via JS, without round-trips to the server. I had a bit of a google, but failed to find much of use - so I wrote my own. This article contains my code for a proof of concept, and a brief description of what it does. It is proof of concept, and done as an example, so code isn't done perhaps as I might do in a real configuration, but I hope it provides help to others.

His end result lets you dynamically load in new form elements via some jQuery trickery. Complete code for the Javascript, view, form and the YAML markup for the model are included.

0 comments voice your opinion now!
sfform symfony framework tutorial dynamic subform


blog comments powered by Disqus

Similar Posts

PHPit.net: Building a simple MVC system with PHP5

PHPMaster.com: Ruling the Swarm (of Tests) with Codeception

Cameron McKay: Counting Syllables and Detecting Rhyme in PHP

Pierre-Alain Joye's Blog: ext/filter, API frozen (!) and fixes, 0.11.0 is out

Lorna Mitchell's Blog: Building A RESTful PHP Server: Routing the Request


Community Events





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


introduction conference threedevsandamaybe deployment bugfix api list laravel release series symfony zendserver voicesoftheelephpant tips community framework interview code language podcast

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