The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
wpdatatables Integration With FormidablePro
Hi folks,
I just wanted to leave a bit of support for others who may need to amend or create their very own SQL query using wpdatatables integration plugin.
For those who have purchased the plugin, this does offer the ability to build tables based on forms submitted and retrieving values based on the fields associated with the form.
i have paid a developer to write a query to do just this to get the same result, however i will supply the code for you to adapt to your needs.
My need was to create a specific filter based on the query which can also be done by the plugin but wanted to share the query if you choose to use it and make use of it.
select
max(case when fld.name = 'User ID' then mta.meta_value end) as 'User ID',
max(case when fld.name = 'IP Address' then mta.meta_value end) as 'IP Address',
max(case when fld.name = 'Server' then mta.meta_value end) as 'Server',
max(case when fld.name = 'Entry Time' then mta.meta_value end) as 'Entry Time',
max(case when fld.name = 'Entry Date' then mta.meta_value end) as 'Entry Date',
max(case when fld.name = 'Country' then mta.meta_value end) as 'Country',
from wp_frm_forms frm
inner join wp_frm_fields fld on (fld.form_id=frm.id)
inner join wp_frm_items itm on (itm.form_id=frm.id)
inner join wp_frm_item_metas mta on (mta.field_id=fld.id and mta.item_id=itm.id )
where frm.id=15;
you may want to add conditions to the query for your very own purposes but at least you can see the framework that you can easily edit.
replace all instances of field names to match your own such as 'User ID' both need to match like so and do this for each field you want to query
max(case when fld.name = 'Feild 1' then mta.meta_value end) as 'Field 1',
max(case when fld.name = 'Feild 2' then mta.meta_value end) as 'Field 2',
thanks Chris
June 13, 2018 at 9:46 am
Thank you thats very helpful
June 14, 2018 at 9:36 am
Is there any previous steps before writing the sql code . cause its not woeking forme
Thx for help
June 14, 2018 at 9:42 am
What are you trying to achieve?
Paste your code and I see what you are trying to do
Thanks
June 14, 2018 at 1:15 pm
Send me the code and what you are trying to achieve?
Let me look
June 18, 2018 at 1:42 pm
Thanks for share it. Also is possible to send data to a MySQL table using a MySQL Action.
July 20, 2018 at 12:38 pm
I tried this code in Wpdatatables Mysql query but its not working , can you please give me a hint
thanks Chris Wareham
select
max(case when fld.name = 'Work order' then mta.meta_value end) as 'Work order',
max(case when fld.name = 'Assign To' then mta.meta_value end) as 'Assign To',
from wp_144425010_frm_forms
inner join wp_144425010_frm_fields fld on (fld.form_id=frm.id)
inner join wp_144425010_frm_item itm on (itm.form_id=frm.id)
inner join wp_144425010_frm_item_metas mta on (mta.field_id=fld.id and mta.item_id=itm.id )
where frm.id=12;
September 20, 2018 at 11:50 am
That query will crash your WPDatatable.
WPDatatables save hook is not the way to go either. If you get that to work you will need to re-implement the Formidable Pro form in WPDatatable.
If I can't post this here, let me know and I remove this comment.. But I wanted to inform you all that I am building a responsive grid that lists Formidable entries that can be searched and filtered (in the second release) inline edited and that will use the actions, validations and formulas from the form.
If that sound usefull: I give an early bird discount of 10% when you send me a message from the plugin page at https://www.teowin.nl/products/teowin-grid/
November 20, 2018 at 11:49 am
hi, i need a mysql developer to make a custom query to get a wpdatatables that then i'll use as base for radar chart engine. this chart needs a particular table to work (pivot table). Can you give me your developers contacts? can you tell me the price for your custom query?
November 20, 2018 at 12:24 pm
Hi,
I can write that query for you but not for wpDatatables. That will only lead to misery.
I suggest to find another table/grid, there are plenty out there.
November 21, 2018 at 8:51 am
"That will only lead to misery." can yout tell me why? i would like to use wpdatatables becouse it has chart.js engine incorporated with radar chart capabilities. There are other plugins with this feature? i try also formidable forms chart but radar chart isn't possible whitout plugin customization:(
November 22, 2018 at 2:20 am
You can test for yourself: install the plugin, create a datatable based on mysql, insert the query in this thread (but don't forget to change the formID) and try to save your definition and if it saves, try to modify the definition. That randomly worked and did not work on my computer, crashed with all definitions except one on a client's computer and on my test website.
I would suggest: hire a pro, assuming coding a plugin showing a chart with Wordpress data is not THAT hard.
Discussion closed.