Hey there, Awesome Customers!

Just a heads up: We'll be taking a breather to celebrate International Workers' Day (May 1st and 2nd - Wednesday and Thursday) and Orthodox Easter from Good Friday (May 3rd) through Easter Monday (May 6th). So, from May 1st to May 6th, our team will be off enjoying some well-deserved downtime.

During this time, our customer support will be running on a smaller crew, but don't worry! We'll still be around to help with any urgent matters, though it might take us a bit longer than usual to get back to you.

We'll be back in action at full throttle on May 7th (Tuesday), ready to tackle your questions and requests with gusto!

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find loads of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel). These gems might just have the answers you're looking for while we're kicking back.

Thanks a bunch for your understanding and support!

Catch you on the flip side!

Warm regards,

TMS

Okay
  Public Ticket #3491011
Functionality of wpdatatables and gravityforms
Closed

Comments

  • Mathias started the conversation

    Hi there.

    So, before buying i am curious:

    - Im trying to do a "booking service" website using gravityforms, ACF and then perhaps wpdatatables?

    I have made a ACF post type with "Bikes". Each bike can be associated to a wordpress-user or multiple users.


    What i would like to do is: 

    1. Create an overview with wpdatatables of the bikes that are associated to each user. So when they login, they only see their own bikes?

    2. For each record (if they have multiple bikes) i want them to be able to go into each bike, and then have an overviw of all the gravity-forms entries they made associated to that bike.?

    3. By looking on youtube, it doesnt seem that "data source" after a table has been made with SQL is so easy to modify (unless you have a developer) is the GUI gone, once the table has been made?

    4. Only administrators should be able to see "all bikes", and perform actions like editing etc. 

  •  1,692
    Miloš replied


    Hi Mathias,

    Apology for the delayed reply.

    -

    This scenario could be easy if you had one Manual Table made by our Plugin,

    or at least, let's say a simple SQL Table in your Database which is a 'stand alone' Table that has its own set of Columns and Rows.

    Then you could add a 'user ID' column, which we could use to limit what each user can see on the "additional SQL Query based Table",

    so then each user could only seee the entries they added.

    -

    Here is my example of that scenario :


    Yes. You can achieve this with our premium plugin if you use SQL based tables.

    For example, you can have one main/master Manual table which will store all the data in the database.

    Then, you can check this table's MySQL Table name from the Editing tab in the back-end table settings,

    and you will be able to make multiple SQL tables that pulls data from the same "master table",

    and any editing you do on all these other SQL tables are going to be stored in the same table in the database,

    This will be my example table :

    3791094982.png

    Now, to make a new SQL Table from it,

    first, check in Editing Tab/MySQL table name for editing:

    6795720227.png

    in my example, the Manual table name is wp_wpdatatable_39,

    so i make a new SQL table that will pull data from it;

    and we can choose all columns like :

    SELECT * FROM Table_Name

    or just specific columns;

    we can also have completely different settings/filtering/sorting and limitations for front-end users on each table;

    and you can make multiple SQL Query tables that pull the same data from the "main table".

    SELECT  column_name1,
            column_name2,
            column_name3
    FROM table_name

    -

    In this example, if i want to limit to only show the "Company" column, and i will leave wdt_ID ( because we got to have row ID)  and userid ( if we want userID for limiting rows per currently logged user ID),

    when i hide those columns in the end, the front-end user will only see the "company" column.

    SELECT  wdt_ID,   
         userid,    
       company    
       FROM wp_wpdatatable_39
    4596672496.png

    Later, you can make another SQL Table that will show some other columns, have other filters and so on ( depending on what you need to achieve)...

    You can see my Video example here https://watch.screencastify.com/v/jOXrsJ9jaspWG5m3VqZH


    -



    2. But now, more about your specific scenario, which would include taking submissions on front-end from users via a Gravity Form,

    then perhaps combining that with ACF,

    and in the end try to pull an SQL Query based Table from all this data.

    -

    For example, if you just used a Gravity Form to take the entries from the users,

    we have a Native integration with Gravity Forms, a premium add-on,

     which you can easily use to link a new Table with a Form.

    -

    Then, since the Gravity Form will automatically have that hidden field which stores each User ID of their entry,

    in our connected Table, go in "Gravity Settings" on the back-end,

    and enable "Filter by user"  option.

    This will limit the front-end view of this Table for users, for each user to only see the entires he/she added,

    and hiding other people's rows.

    -

    On the back-end, you can make a duplicate of this Table for Admins,

    and rename it to something slightly different like "Form for Admins" or anything else;

    and on that table remove the limitation, so there an Admin could see and change everything they need.

    They can also choose to see additional fields from the source Form,

    while for the front-end user Table you could limit to see less Fields, etc.

    9573756536.png

    Before purchase you can test all plugin and Gravity integration Add-on features on our sandbox site.

    -


    3. Now, about the ACF - if you need to include that and need to pull SQL Queries from it :

    At the moment we don't have any native integration with the ACF, so 

    pulling this data can only be done through MySQL query-based tables.

    Please note: Using this plugin feature requires at least a basic knowledge of SQL. It is assumed that you can create the table in some MySQL data manager (e.g., PHPMyAdmin, MySQL Workbench), and prepare a SQL query that will return the data you need. 

    A good way to achieve this can be experimenting using our WPDB SQL Query Constructor tool.

    You can also try this other SQL Query helper Tool,

    Create a MySQL-query-based table by querying a database,

    that one has a wider range of all tables you can choose from your Database outside of WPDB.

    - Please note: this tool is not an ultimate query generator. It simply constructs a suggestion of a query. We are constantly working to improve it, but SQL is such a complicated and flexible language that full automation for constructing queries is next to impossible. 

    Consequently, the more complicated the query, the higher is the probability that it will not return exactly what you need. So, you will often need to play around with the resulting query.

    Please be advised that writing custom SQL Queries or debugging Queries does not fall under what our support covers.

    You can check out this official page of WP codex,  for help with writing custom Queries.



    4. To answer your question #3 ( sorry that i am randomly writing like this, it was a lot of details to cover):

    By looking on youtube, it doesnt seem that "data source" after a table has been made with SQL is so easy to modify (unless you have a developer) is the GUI gone, once the table has been made?

    - You are right, if you first use our SQL Constructor Helper Tool ;

    whether if it is the first one ( The one limited to WPDB Structure)

    or the second one ( The more flexible/ classic SQL Helper, that shows all tables from the DB);

    when you tell the GUI what are the Tables and Columns, and if you need any additional relation between Tables,

    or a Condition, etc,

    1073647688.png

    After you hit "Create the Table" and it gets generated,

    after that it is not possible to "go back" to the GUI and modify something from that SQL Table in that way.

    6167230865.png

    As you said, that GUI is gone after the Table is made,

    so only if you have SQL Skill ( or your own developer)  you can modify the Query itself,

    but if a user does not have those options, they would go back in the "Create Table" wizard, choose the GUI again for a new Table.

    We did have one or more users request that "go back to GUI after the table is made" feature;

    at the moment it's not possible, but we have that planned for the future,

    If you wish to affect this development speed,

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.

    -

    And i just wanted to point out that you can try wpDataTables before purchasing

     on our sandbox Demo sites ( you can find links for the main plugin Demo,  

    as well as add-on Demos, in my signature),

    and there is a 15-day money-back guarantee period, 

    so if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)

    Let me know if you have any additional questions. smile.png


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

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

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables