Wordpress Gravity Forms - Dynamic population - forms

I have a gravity form on my site that looks like this:
Activities:
[checkbox] Brand
[checkbox] Retailer
[checkbox] Other
Tags:
[Text input]
I want to dynamically fill the text input with the selected activities, so for example when Brand is selected it places Brand into the text input.
Is this possible with dynamic population? If so is there any tutorials for me to follow? I've been able to find how to dynamically populate using the page URL but nothing like this but imagine it has to be possible…
Cheers!
Nick

This is possible with Gravity Forms Copy Cat. Here's what it looks like:

Correct me if I am wrong, but I believe the dynamic population of an input in Gravity Forms has to come from a pre-established piece of information. You can write a custom filter to pre-populate the field on page load, but that info has to come from somewhere. It needs to already be established. With PHP it is fully processed on the server when the page loads, so I don't think you can watch for the checkbox to be clicked and then dynamically populate the field just from a Gravity Forms filter. I believe you would need to implement some custom JS or AJAX to accomplish this. I'll mess around with GF a bit and see if I am wrong or can find another way of doing what you're after. Maybe someone else can better answer this in the mean time.

Related

Getting more information from form choices

I'm not sure if this is the right place to ask this. But I work for a large design company and the way we receive work is through a request form in Adobe Workfront.
We would like to have a spreadsheet that gets populated with all of the info from the choice they made ie: if they selected a social media graphic for twitter, we would like there to be an output of the correct aspect ratio, whether we use our logo on that graphic, and whether we include text (if yes what would that be?).
Is there a good way of going about doing this? And if I am in the wrong place, where would I be able to get a good answer?
Thanks for the help!

Drop down according to Location - gravity forms

Does any of you know if it is possible to get different dropdown field according to the location you are in?
Preferably in Gravity Forms.
There are many options, you didn't really provide enough information to provide much guidance.
A general approach is to have an array for each set of choices you want. These can either be hard coded or you can pull them dynamically from a database depending on how many there are and whether they change.
Here's a link to the Gravity Forms support site with info on how to dynamically populate the drop-down.
You could have a dropdown before the one you mention that determines which set of data to use to populate your main dropdown.

SYMFONY FORM - filter attribute form on top with submit button, that provides a table with other form used to edit each row details

I am looking for best practices on SYMFONY FORM handling to achieve the following standard page (surprisingly I haven't found anything similar existing yet on SO).
Here is a shema of what I want to achieve:
As you can see at the top there is a SYMFONY FORM to filter the results that should be displayed.
It displays a table and each tuple of the table should permit to open another SYMFONY FORM kind linked to the tuple.
I am in the process of learning SYMFONY FORM, so far, I can manage to create the top row FORM to set the filter that'll apply to the table display.
But I wonder if anyone has experience on the second part: Displaying the table that embed as well many forms of a similar kind -That seems a bit more complex. I read about TWIG.EXTENSION and FORM.COLLECTION, I'll investigate that. But if someone could save me to re-invent the wheel and lead me to some direct shortcut, I'd be really grateful.
No idea if it's the best practice, but one way to do it would be to create a new property for your entity being listed in this table, called $editionForm (without mapping it to the database) for example.
Then, either throught a custom loop or by listening to a doctrine (or any ORM you use) hydration event (or triggering such an event if you don't use any ORM), fill the property with the generated form, probably within a dedicated service.
Then, just use it in your template like this :
$entity->getEditionForm()->render()

Intercepting form submission and displaying results in cakephp without JS

In my Manager controller's add action I want to intercept the form submission, perform a search using the submitted data, and (if the query returns any results) display a list of results to the user.
My question is: what is the best way to display the results to the user? Should I just redirect to a different action (say search), or is there a nice way to display the data while remaining in the add action (session flash maybe)?
I know this can easily be done with the ajaxHelper and I am approaching this from that angle too, but I also need this functionality for my non-javascript users.
Any ideas appreciated!
badp,
you could just have a look at one of the generated (by cake bake controller ..., resp. cake bake view) controller methods named edit and look at the dataflow there.
It should be easy to adept it to your needs from there, as you can compare the dataflow and its outcome visually.

Customising Symfony Admin Generator Form

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 .