Okay
  Public Ticket #2908506
Gravity form integrate within wpdatatables in order to perform Tags.
Closed

Comments

  • Douglas started the conversation

    Hello nice to talk with you guys. I have a little question with formatting data in a table that I'm doing here in my WordPress site. What I'm facing here is how could to get Data from a Multiselect to display neatly formatted like it does when using the Gravity forms addon or a standard table when I am having to write a custom query. We need to access information from two related Gravity forms and display it in a Master Detail table. I wrote the query already and it pulls all of the desired data correctly. The issue is that the data from any multiselect displays just as it is in the database, but obviously we want it nice looking as in your other tables. I was wondering if you guys had any idea of how could I implement it in that specific situation however in the photo attached what we want is related to the skills table so we want to convert this whole ["skills", "JavaScript","Ajax"] in to a format in WPDatatable like Skills: JavaScript, Ajax, etc. Any chance, somehow it would be able to be done in master details? Thanks for reading! I look forward to your feedback.

  • [deleted] replied

    Hi Douglas

    Thank you for reaching out to us.

    Can you please show us how are these values being pulled to the table? 

    Writing custom queries is not included in the provided support but we will gladly have a look and see if we can assist somehow. 

  • Douglas replied

    SELECT form_id, entry_id,
    GROUP_CONCAT(CASE WHEN meta_key = '18' THEN meta_value END) AS team,
    GROUP_CONCAT(CASE WHEN meta_key = '2' THEN meta_value END) AS title,
    GROUP_CONCAT(CASE WHEN meta_key = '24' THEN meta_value END) AS aprovation,
    GROUP_CONCAT(CASE WHEN meta_key = '23' THEN meta_value END) AS client_feedback,
    GROUP_CONCAT(CASE WHEN meta_key = '19' THEN meta_value END) AS skills
    FROM ykg_39_gf_entry_meta nt
    WHERE nt.form_id = 53
    GROUP BY 1,2

    up there is the query I used along with the option creating a query sql

    also in the pic 1, 2, 3 I show you how it looks like, sorry for bothering i know this ain't your business about query but would appreciate if you guys can help me

    I made a test in the image 4, 5, 6 with a different approach and the data is return with the style exactly that we want, if you check the image you will see what I mean,

    maybe I would be able to pull this mix of situation like making the skills looks like the sample test? 

    since I can't update more follows the rest of the example bellow

    5 - Z3wOoAs.png

    6 - DyHO5JQ.png


  • [deleted] replied

    Hi Douglas

    Since it is stored in the database like this, wpDT can display only what is in the database. Please check how it is entered into the database, but I think that for each form there is a specific number of skills that has been selected, so it comes out like this. To change that, you will have to separate them through query, and I'm afraid that's out of our reach.