Okay
  Public Ticket #2706732
Gravity forms
Closed

Comments

  • Travis started the conversation

    Hi there,

    I'm looking to build a simple chart that tracks entries using a count. I have a dropdown in the form to supply the "who" and am looking to pull how many forms were submitted. Any easy way to do this? 

  •  471
    Isidora replied

    Hi Travis,

    Thank you for your purchase.

    For creating charts you will need to use one string type column(string, date, DateTime...) and all other have to be integers and floats. If your table has those data then you can try to use the option Grouping charts.

    Let me know is this what you looking for.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  • Travis replied

    Hello Milan,

    I guess the first issue is creating something that would create a "count". I have ways to give each form a number but really the system just needs to show how many forms were submitted. Is there anything you can think of that would count the entries?

  • [deleted] replied

    Hi Travis

    If you are referring to entries when you say forms you can add a hidden field in the form that will add one after every form submission. 

    Later you can add this column in the table which will be integer column type and you can use calculation functions to calculate a total.

    You can showcase a table with those options, you can show the total value with a shortcode, but you will not be able to display that value on a chart.  

    I hope this answers your question, but please send us some examples on how you would like to display the data or send us a recording so we can understand better. 

  • Travis replied

    This is great. I have it all working. My only issue now is getting my charts to have a filter by date.  I am using a gravity form to produce the data. Is this a limitation or do the charts not allow the user to sort by date or am I just doing it wrong? 

  • [deleted] replied

    You can use the date-range filter for the date column, and when you create the chart, in the wizard enable "Follow table filtering". That will make the chart follow the filtering of the table. Then you can hide the table using some CSS and you will have only the filters and the chart shown.

    you would first need to disable the following in table settings: 

    "Show X entries" drop-down; "Info Block" from Display tab: 

     

    "Enable main search block" from Sorting and Filtering tab: 

     

    And "Table Tools" from Table Tools tab: 

     

    Then, you can hide the table, leaving the filters above the chart like this:

    <style>.wpdt-c .wpDataTablesWrapper table {display: none !important;}</style>[wpdatatable id=1][wpdatachart id=1] 

    And that's it. This is how you'd create a page where you'd have Chart #1 dependent on wpDataTable #1 so it follows filtering, and the table hidden using CSS. 

    I hope that helps 

  •   Travis replied privately
  • [deleted] replied

    Hi Travis

    Unfortunately we don't provide support via Zoom or screensharing, but I can see the images in my previous answer were not sent properly so I will try and resend this again with the images, hopefully this will make more sense.

    "Show X entries" drop-down; "Info Block" from Display tab: 

     

    9479603963.png

    "Enable main search block" from Sorting and Filtering tab: 

     

    9860660830.png

    And "Table Tools" from Table Tools tab: 

     

    6739783940.png

    Then, you can hide the table, leaving the filters above the chart like this:

    <style>.wpdt-c .wpDataTablesWrapper table {display: none !important;}</style>[wpdatatable id=1][wpdatachart id=1] 

    Do let me know how I can provide more assistance, what step you are having issues with so I can try and provide a more detailed explanation.

  • Travis replied

    ok,

    So I may have a few issues going on. I'm trying to display the amount of leads sorted by lead source and being able to choose date ranges. I'm also using gravity forms. I added a field to each form to hold the number 1 to be able to add up the numbers. Each form also has the referral source and will group them by source. When I try to add a date column, (date the lead came in) I get "Please do not add more then one string-type (date/time, image, email, URL) column since only one can be used as a label" Any suggestions? 

  • Travis replied

    Also...Can you send a screenshot of where I can see the Date range filter for the chart?

  • [deleted] replied

    Hi Travis

    Each chart in our documentation mentions that one string or date column supported, and that goes for all charts.

    Meaning you cannot add more than one string-type column (string, date, datetime, URL, email). The string-type column will be used for the X axis, and all other columns need to be integer or float. You will probably need to restructure the table, in order to get the chart you need.

    Can you show me your table and the chart in Excel (for example), and I'll see if there's a workaround for what you're trying to achieve?

    Here is a screenshot of the date range filter, but it coming from the table that is hidden, there is no specific date range filter specifically for charts.

    2626438484.png



  • Travis replied

    Ok....I'm making progress. I think my issue was a combination of several things but I have a few working charts now. 

    Now for the final step. Is there a wat to apply a date filter to a chart with a set time frame of "last week"
    I'm hoping for something that eliminates me having to click the dates. and I can set these reports as fied reports that just populate the right dates on load. 


    Thanks!

  • [deleted] replied

    Hi Travis

    This would only be possible with an SQL Query table, where you would show only the last 7 days with one of these queries:

    SELECT * FROM Table_Name
    WHERE connect_time >= DATE_ADD(CURDATE(),INTERVAL -7 DAY);

    or

    SELECT * FROM Table_Name
    WHERE connect_time >= DATE_SUB(CURDATE(),INTERVAL 7 DAY);

    Without those functions, you can also do

    SELECT * FROM Table_Name
    WHERE connect_time >= (CURDATE() + INTERVAL -7 DAY);

    or

    SELECT * FROM Table_Name
    WHERE connect_time >= (CURDATE() - INTERVAL 7 DAY);

    then create a chart based on this table, turn on follow table filtering, place both the chart and the table on the same page and hide the table.

    Now, there is a way to simply hide the table using CSS, leaving only the chart and the filters. Anyone who knows CSS will be able to still display the table if they were to inspect the page, and simply change the properties.

    Since you need to show the filters, a simple css like this would not be useful, because it'd hide the filters too:

    .wpdt-c .wpDataTables.wpDataTablesWrapper {
    display: none !important;
    }
    

    So, instead you would first need to disable the following in table settings:

    "Show X entries" drop-down; "Info Block" from Display tab:

    2852344743.png

    "Enable main search block" from Sorting and Filtering tab:

    3844294247.png

    And "Table Tools" from Table Tools tab:

    6988162559.png

    Then, you can hide the table, leaving the filters above the chart like this:

    <style>
    .wpdt-c .wpDataTablesWrapper table {
    display: none !important;
    }
    </style>
    [wpdatatable id=1]
    [wpdatachart id=1]
    

    And that's it. This is how you'd create a page where you'd have Chart #1 dependent on wpDataTable #1 so it follows filtering, and the table hidden using CSS.