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.
Related
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?
I have a student management system project, where i am taking student enrollment form online using custom php apps.
When i am inserting enrollment form at the very first beginning of the form there is a drop down list of student iD. my client wants if he / she selects the ID of a particular student from the drop down list, his data will appear in to the text box automatically based on selection.
I know that here i require javascript but i am not sure how to do that.i have searched but didn't found any thing relevant exactly. Can any help me out.
Thanks
You need to first capture the onchange event of the drop down list. When this event fires, you will need to run javascript that makes an AJAX call to the server in order to retrieve the student's data based on the selected student in the drop down list. You will need PHP/MySQL server side code to handle this request. When the AJAX call returns with the data, you will need more javascript to populate the textbox where you want the data displayed.
I won't write the code for you, but hopefully this is enough to point you in the right direction.
Edit: If you need more details, lookup how to create an AJAX call in jQuery. Your requirements are not uncommon, so you should be able to find examples that are very near to what you need. See a relevent tutorial: jQuery AJAX Tutorial
I would like to offer the ability for users to open a form built using PHP/HTML and then on that form have a box which allows them to search for employees then want to send the form to without having to submit the form at this stage.
They will get a search box which allows them to enter the name or part name, the query then finds all employees which match the input string and they then choose the correct employee and that respondent is added to a list and they then search for the next employee and so on until they have added as few or many as they like.
Once they have selected the names, they then fill in some other standard fields on the form and then a separate entry is created in the "forms" table for each request sent.
Happy how to do the last part in terms of entering it into the database etc and how to do a "normal" search in PHP/MySQL but what should I do for the search within a form and add to the list pre submitting?
the technique you are looking for is AJAX which uses javascript to examine the form field as they type, talk to the php, get data, then show it back to the user without having to reload the page or sumbit the form. The exact thing you describe is called auto complete which there are many prebuilt tools for (or you can build your own custom one with some js knowledge). I am not going to try to post all the code here since it would be rather long and involved but if you search around these terms you will surely find what you need.
This can all be achieved with Javascript.
If you have a small number of employees, you could send an array of employees with the page. Use an 'onchange' event in the form field so that with each keypress you run a lookup matching the employees against the typed text.
It's likely that you don't have a small enough number of employees, and also I'm not sure best practice advocates sending your entire company address book inside a web page! In that case you will need to do the same using Javascript ajax calls within the page. On each keypress, fire a request back to the server asking for employees matching the text string.
You will need to dynamically display the matching employees in another form widget that allows for selection, or maybe as text with checkboxes etc.
There are plugins that manage all the client side part of this but you will still have to put together your own web service to do the employee lookup.
SO FAR I have made a website which is connected to a MYSQL database. On the website I have many buttons, each button corresponds to a table in my database. When I click the button, a javascript function opens my php file in this form
xmlhttp.open("GET", "addPoint.php?q=" + name, true); Where name is the name of the table
Back to the html. I have a div with an ID that will update with whatever the PHP echos.
The div is now populated with table, reflecting the table in mysql. This all works fine.
Here is the problem: I am trying to implement a voting system, where you vote by clicking on one of the elements of the newly created table. AFAIK the MYSQL updating which will need to happen for the vote to work, will need to be done in PHP, which means that I need to tell the PHP file
The name of the table
The name of the element
I am reluctant to use forms because I would like to just be able to click some text, NOT have to fill in a form or click a radio button.
So how do I get these 2 bits of info to a PHP file? Is the structure which I am doing this any good or should I step back and redesign?
Thanks for reading please let me know if I have been ambiguous.
Familiarize yourself with JQuery. It's great for projects like these.
http://www.w3schools.com/jquery/default.asp
As Norse already alluded to, use javascript to submit a "form" request for you. The javascript can populate the table and element values for you based on the button which was clicked. It is up to you whether this is a GET/POST.
JQuery would be a great way to help make this easier, but you don't need it if you don't want it.
Ok, I know there have been a few questions posted on this but a lot of the information are dotted around and not necessarily connected in one form that I need for my site.
Basically I want to create the style/functionality of the twitter form on their home page.
Where inside the input fields are the labels, and when you click on the input the fields the labels don NOT disappear but fade into a different colour. Its only when you type, is when it disappears.
If they don't type and press submit I want the verification signs come up ( I know how to do this but it seems to be conflicting when I put the jQuery code in)
When all fields are inputted I would like the form to fade and represent a thank you message whilst
the data gets placed into a mysql ( specifically a MAMP/PHP My Admin) database.
Very similar to this form on hbuddy.com
Would massively appreciate if this was responded in a step by step format, simply because i am at the beginning stages of learning pretty complex programming language.
Thanks!
you can try jquery ajax for form submission..
These links will help you for getting started..
http://net.tutsplus.com/tutorials/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/
http://www.9lessons.info/2009/04/submit-form-jquery-and-ajax.html
http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form/