views:

51

answers:

1

Hi,

I've generated the backend of my application, and am now just 'jazzing' the forms up (adding correct labels, validation rules etc).

One thing I'd like to do is add a map (Google) which updates the marker as an address is entered into the form, then allows the user to drag it to correct the lat/lng should it be a little off.

My question is, how can I customise the output of the form - I've read the docs (1.0,1.1,1.2 also) and it all seems very confusing. Customising forms not generated with the admin generator I know how to do using renderRow(); etc; but finding a way to add a little bit of HTML to the forms is making my eyes hurt! There's so much out of date stuff on the web regarding Symfony it's hard to know what to trust!

If anyone can point me in the right direction that'd be great.

Best Regards,

Rich

A: 

Maybe you can start by looking at this plugin : http://www.symfony-project.org/plugins/sfEasyGMapPlugin .

For your question, customizing the forms can be done by creating your own widgets and using them as default widgets. You may want to read this page : http://www.symfony-project.org/more-with-symfony/1_4/en/05-Custom-Widgets-and-Validators .

Romain Deveaud
Think creating my own widget is the way to go here, thanks! :D
Rich