Customising Symfony Admin Generator Form - forms

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

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 .

Related

Form Analyzation and Suggestions

I was filling out a form on uSell.com to ship out an old phone and when I entered my address, a dialog box popped up telling me what I entered along with their suggestion of what to change it to. I thought this was cool and was wondering how I can replicate that in my forms.
Looks like you talking about some kind of auto-completer. This can be done in various ways, depending on the languages you are using. You can make a simple auto-completer using just html, javascript and css. More complicated auto-completers can make server side calls to search through a database etc.
Have a look at the link below, they explain a very simple auto-completer.
Related topic
Hope this helps, good luck :)

Any wordpress form building plugin for my requirements?

I'm looking for a WP plugin which can allow me to create different forms and embed them on pages and following are the requirements:
Only a single textbox required in each of those forms
The submit button will only be shown if a custom entry/answer is inputted into the textbox. (basically a client-side validation)
The submitted answer should be stored in the back-end with the usermeta (or just the username of the user logged in) so that I can export the entries in a format like csv, etc.
Any thoughts?
P.S. I have found one but not sure if the PRO version of this allows me to have a validation for a custom text. This is the plugin: http://wordpress.org/extend/plugins/visual-form-builder/
Gravity Forms is the most robust form builder plugin for WordPress. You can, with the right knowledge and skills, make it do pretty much anything you'd like. You can find it here: Gravity Forms.
Very well, I've found this. There are actually good plugins however, you will have to purchase it. I'm looking for a free one. http://www.webdesignboom.com/2013/formcraft-wordpress-form-builder/

Twitter/Facebook-like User Tagging In A Rich Textbox/TinyMCE

I'm looking for a little advice as to how to go about this one.
I've got an ASP.NET MVC 3 application written in C# with a form that contains a TinyMCE textbox as its rich text editor.
I've been asked to see if it is possible to add user tagging into the form via the textbox much like Facebook/Twitter with #user and an autocomplete.
I've got a reasonable idea of how I'm going to go about getting the data, but I'm not certain if it's even possible to add the functionality to TinyMCE (if that's where it needs adding).
In short, I'm just after a way of a user being able to start typing #user and have the autocomplete dropdown come up much like on Facebook. Though the piece of the puzzle I'm missing is how to implement it. I've got a rough idea of how it will be pieced together overall, just not how to get it to work within the TinyMCE box or have it start working when # is typed (when not part of an e-mail address too).
Any suggestions?
Twitter has made available their own auto-linking engine, take a look: https://github.com/twitter/twitter-text-js
It is as simple as
// basic extraction
var usernames = twttr.txt.extract_mentioned_screen_names("Mentioning #twitter and #jack")
// usernames == ["twitter", "jack"]

Best practices for designing GUI in GWT

I have recently started studying Google Web Toolkit. I have went through some walkthroughs, and I think I understand the basics and the idea. However, I have some questions on the overall architecture and design of the applications.
Let's start with the GUI. I want to build a "common" web application, where the user first sees a login page. After successful login, the user is redirected to some kind of index page and a menu is added. I created a new LoginComposite for the login page, and tried to design a nice looking HTML table using the GWT Designer. However, I find that really hard to do, as you cannot set any individual properties on the individual cells (TDs)? There's no way to specify colspan or rowspan, and I can't set any padding or margin on the cells themselves. In short, I know exactly how I would have written the HTML code, but I can't translate that to the designer. Is that just me?
Also, I am wondering about the best practice for code layout and design. I went through the StockWatcher tutorial, but that's really not a very realistic web application. For example, I would like to know how I should design different forms (should each be in a own class inheriting the Composite-class)? How should I switch between forms (for example, first a list view, then a form for editing a chosen item from the list, then a totally different page)? If I have one Composite for each page, and instantiate them when needed in my EntryPoint, would that mean that the client will download all the JavaScript for all those Composites at page load? Should I stick with only one HTML page, or should I have many?
These are questions not really covered by any GWT tutorial. If anyone know a good example of a "real" web application built using GWT, I would love to see it.
Thanks for your input!
There are a whole bunch of resources in Google IO talks. For example:
http://www.google.com/events/io/2011/sessions/high-performance-gwt-best-practices-for-writing-smaller-faster-apps.html
http://www.google.com/events/io/2011/sessions/highly-productive-gwt-rapid-development-with-app-engine-objectify-requestfactory-and-gwt-platform.html
http://www.google.com/events/io/2010/sessions/architecting-production-gwt.html
http://www.google.com/events/io/2010/sessions/architecting-performance-gwt.html
http://www.google.com/events/io/2010/sessions/gwt-ui-overhaul.html
http://www.google.com/events/io/2009/sessions/EffectiveGwt.html
Also, don't expect to be able to edit absolutely everything if you are using the GUI to build your GWT app. Good luck!

Developing a GUI Builder Application

I am looking for a nice framework for developing a GUI builder Application. We have an application where 100Os of custom data entry forms and their print formats are required and each client will need some modifications on these. We have a developed a product using java based open source templatnig frameworks so that the layout and field definition are stored in database and rendered dynamically to the user. We also have an appication to design these forms but cannot do visual design.
Now I am trying to make a Visual Form Designer application for generating these forms. Can any one suggest some open source frameworks than can be used? Can I use Eclipse Visual Editor? Or is it better to develop some kind of parser for HTML using AntLR and then parse the HTML output from already existing GUI builders like Dreamweaver to get the desired output?
Thanks and Regards,
-- Kannan
Oooh, great question!
I wouldn't know any readily availble framework that you can use. Depending on your needs however, I think rolling your own shouldn't be too hard.
First of all, you probably wouldn't want to give the users too much freedom. Freedom only gives them the opportunity to mess things up and make the resultant forms hard to use. I think from your description that the fields are pre-defined, so that the user only needs to customize which fields appear on a given form, and in what order. Order can be a simple thing like top-to-bottom. Some semi-intelligent automatic layouting could be used to conserve screen space. Adding a feature to group fields together would probably also be useful, and grouping would lead to some kind of standard "group" widget.
Accepting simplified functionality like this, you don't really need the flexibility of a full gui editor. A couple of listviews, maybe a property sheet and a preview window will be enough to give your users the functionality they need.
Of course, this only holds for screen forms. Print forms may be trickier to layout, as people may want to cram as many fields as possible into very little space so the entire form can fit on a single page or something. I really don't have any suggestions for you there, but maybe a similar "simplified" approach with some intelligent auto-layouting could work.
Overall, my advice would be: Keep It Simple! (S... ;)