I have a tournament with multiple divisions and multiple forms for which I use gravity forms.
There are times when someone requests to be changed to a different division. However, I am unable to move the competitor from one division to another in gravity forms, as the divisions are each using a different form ID (and they have still not developed a method for helping with this).
How would I go about moving a SINGLE ENTRY from one gravity form to another forms entry list please.
We have many teams at the tournament, so mass export and import is not what i am looking to achieve. Its about being able to move a single entry from one list of entries in one form to another forms list of entries?
ANY help would be greatly appreciated. Even a simple "use this method" in general terms will help me greatly. Would I use some form of JQuery fiddle, a php script, an sql script or what please as Import Entries is not available currently in GF
Regards
You can not do that, but instead maybe you shold design your form to include all types of submissions logic. I mean you can put a drop-down field at the beginning of your form. Then you can use https://gravityview.co/ to edit your single entry field.
I have a workaround for this which i am using in one of my current projects for http://projects.dzign-r.com.au and that is,
1) export both of the the forms (i.e the one from which you need the field to move and the other to which you need this field to be moved to) and it exports these as json files
2) search for the field ID that you need to be moved to another form, cut its json code from the json file and paste it in the other form's json file where you need it to be moved to
3) then import the form back. and test it to make sure it works as you want it, (as a caution you may change the field ID after you paste it in new form to be something which is not used in this form already).
4) once u see everything is fine u may just delete the old form?
Related
Well. This is complicated, so I'll explain it the best I can.
What Works: If you visit https://goatthroat.com, you will see a Gravity Forms form on the homepage with the heading "Find the Right Pump." Here is how this form works:
1. I have uploaded a CSV that is a table of ALL of these chemicals and their pump compatibility (see https://www.goatthroat.com/support/complete-chemical-liquid-compatibility-guide/ -- which is a table also generated by this CSV)
The dropdown menu on this FIND THE RIGHT PUMP form is automatically populated from that CSV
The user enters the info as prompted, and it generates a query string to return the appropriate results (i.e. https://www.goatthroat.com/pump-recommendation/?chem=3M+Adhesion+Promoter+4298UV)
Goal: On another form on another page (https://goatthroat.com/quote-request), there is ANOTHER dropdown with the same list of chemicals.
I would like to be able to incorporate their search results IN THE FORM. In other words (and I know this may seem unclear): fetch, using ajax I assume, the results of this form search LIVE and include them in the form submission.
This is a bit more technical than I usually get, so any help is much appreciated.
I would like to know if its possible to process 2 forms at once? my scenario is this:
I have a contact page on my website which consists of:
1) Customer Details
2a) General Enquiry
2b) Get Quote
2c) Check Availability
section 1 is always the same is a form on its own, where as section 2 will only show details for one of the options (selectable from drop down box.)
so in total I have 4 forms of which 2 will always be filled in, and i need to process them both to email through to me. I don't want to have to include section 1 at the top of each form if i can help it)
I hope this all makes sense.
Long story short: You can only submit one form at a time.
Any reason you dont want to make it one form? Seems like it would be a lot easier to make it one form and do all of the processing on the other side.
You can only submit one form at a time. You have a couple of options:
1) Combine the two forms into one form and use CSS/JavaScript to show/hide the relevant fields. This way, all of the form fields will be submitted (including the ones you're not interested in). This is what I would do.
2) When the user submits the form, use JavaScript to send the appropriate data to the backend.
I have tried a lot and have not yet able to find solution to this problem. i am not sure if thats possible or not.
I have one table called Student then table called Assigment and Solutions
Now there are questions Stored in Assignment Table which are common to all students. But different student will submit different solutions.
On the form i want to have label as Question text and then text box as solution to that question.
IN the beginning i have the empty answers in database.
I am confused how can i use symfony to build this form
Becasue all solutions will be submiited togetehr with one submit button
Class AssignmentFormType{
$builder-> add('answer','collection' ....)
This is working fine but only thing here i want is to display that QuestionText as label for that Answer and i am not able to find that for 1 week
What you are trying to do is to dynamically create a form element based on information from your entity (i.e. setting label = $entity->getQuestion)
Two approaches:
A. Dynamic forms
http://symfony.com/doc/master/cookbook/form/dynamic_form_generation.html
Basically involves setting up a listener then using it to create your form element with access to each individual entity. Bit of a pain but it works.
B. Inside of the form template
Since all you want to do is to change the label then it might be easier to just set it inside of your form template. Something like:
{{ form_label(form.assignment, form.assignment.vars.value.question) }}
The .data should give you the actual assignment entity from which you can pull the question.
I am working on a pair of form fields the directly effect one another. Specifically the problem I am dealing with is that we have thousands of groups users can join on this website that I have been working on. We are creating some administrative analytics forms for the site. Part of those forms is filtering by group.
The problem is that most of the people don't know the name of a group off the top of their heads, only what it starts with. So instead of using auto-complete we came up with two dropdowns. The first contains the options A through Z, letters of the alphabet which the group names begin with. The second dropdown contains all of the groups beginning with the selected letter.
The concept is simple enough and we were able to implement the AJAX pretty easy with jQuery. But this causes validation errors. After some research I found that this has to do with Drupal form caching. The solution is to use the ahah functions.
The problem with that is that all the instructions I have found so far deal with ahah actions for the specified field updating itself, not another field. So I am trying to figure out how to get the list of letters to update the group list using ahah and registering the new values with the form cache.
One solution I found was to simply load all the values on the page in a hidden dropdown and then just load up those in the set in the visible one as needed. But that creates a bunch of problems because the client uses almost exclusively IE and we have seen IE choke when given huge lists like that. Especially with the lists stored in JavaScript. So we need a light-weight solution.
Any thoughts? Ideas?
In a nutshell AHAH works like this:
Form gets generated with an empty $form_state
When an element that has the #ahah property gets changed an ajax call is made to the url specified as path in the #ahah property.
The callback at that url does this:
Retrieves the form from the form cache
Processes the form
Rebuilds the form with a current $form_state so that it can add / change elements based on that
The form is put in the form cache to avoid validation errors
The form is rendered and returned as JSON
Drupal replaces the contents of the wrapper div with the new form.
In your case you'll need to make your form generation function aware of the values selected in $form_state. It would have to:
Generate the letters drop-down
Look into $form_state and see if there is a letter selected. If so, generate the second drop-down based on the selected value.
The callback function would implement the form caching and rebuilding.
There are good explanations with code for the callback function here:
http://drupal.org/node/348475
http://drupal.org/node/331941
I actually got the answer on another StackExchange site. His suggestion to use the example module to come up with the solution worked very well.
Solution found here: https://drupal.stackexchange.com/questions/35048/using-drupal-6s-form-ahah-to-have-one-dropdown-field-update-the-values-of-a-sec
ok heres my problem.
I have a database table that i want to edit multiple rows by using one form.
I am looking for a way to be able to display a form in which i will be able to edit the rows and save the entries in a grid view kind of way.
Can this be done by dynamically letting the user choose which fields he wants to edit or provide an excel sheet kind of interface where changes are made and saved to this already existing database table.
Using PHP, if you name the form fields as nameoffield[] they will arrive in the request back to the server as an array. Just make sure empty fields have some place holder when they get sent back to the server and just parse through them one by one performing updates/inserts as necessary.