I'm trying to create a Survey builder wizard that would be embedded in the website.
Users will be able to create their own surveys by dragging and dropping appropriate form elements such as checkboxes, radiobuttons etc
Once the user creates his survey br dragging and dropping the appropriate form elements such as radiocontrol, checkboxes - He should be able to save the created survey and publish it.
While going about doing this I came up with the following questions:
I could build my own drag and drop form building wizard - but is there any open source plugin/code out there so that i dont need to reinvent the wheel ?
How the should the form structure be saved ?
Should the form elements with the associated text be saved in a database (mysql) and rebuilt on the fly when someone accesses the survey link on the mobile ?
Should I be looking at XML/JSON to store the html form structure
Would appreciate any help !
Here is one that we're using now to put a form builder on our client's website.
http://www.botsko.net/blog/2009/04/07/jquery-form-builder-plugin/
The form can be serialized to both JSON and XML.
You can use jQuery UI for the drag and drop operations. I would make use the grid functionality provided.
To save the form I'd make standardized representations of the elements in a JSON format and save those.
This representation should include the left and top css attributes (for positioning) and a subset of styles and attributes which your users can assign their input fields.
Just for completeness
At the time I posted the question, this was not available or else I would have opted for this to build the front end :
http://getfuelux.com/formbuilder.html
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 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?
How can I add certain values to a form with Drag n Drop?
I would like to create a drag n drop list of groups that a user can choose to send information to. A user can drag and drop the group name to a certain area. After this operation, the form must know what group_id was added to the form (via hidden field for example).
How can I achieve this in an easy way? I would like to use jQuery to do this. FYI, I am using CodeIgniter and mySQL to process my forms.
Thanks in advance.
How can I save the state of various draggables and droppables (along with their background images) and assign a button to create a new html which adds some of the more features to the existing states?
Your question is quite ambiguous...
Why don't you look into jQuery:
Draggables
jQuery Post
I assume what you are wanting to achieve would need to be saved into a database, so you would use AJAX to then save the positions from the dragable elements
i got a form (using form api and drupal_Get form ) and i got a form with 50 fields and some of them are non frequently chaning data like hobbies, year of birth , city/country etc...
i currently do just them in array in file and put them in #options=>$array ... is that the fastest way to save resources? or should i use taxonomy/variable_set/database query/block/node or whatever?
variable_get/variable_Set : Is generally used to store admin preferences for the site. If these are user specific I don't think it's a good idea to save them using variable_set
taxonomy : Can also be used for populating the values of
drop-downs, that is for options in the listing. In your case create a vocabulary
called hobbies and add
swimming,reading,drupaling as terms.
Then use the content-taxonomy
to use taxonomy terms as drop downs using CCK moudule.
nodes : Anything that is user
specific should go in as nodes. And
any content that can be created by
the users should also go in as nodes.
For administering forms you can use variable_set/variable_get.
But for your task it seems like that users enter their bio, so in this case you should store each form submission to new "row", as you do now for file (wonder why you don't use DB storing).