Okay
  Public Ticket #3409446
General Guidance On Our Application
Closed

Comments

  • Tony started the conversation

    Hi,

    I'm looking for very general guidance (top level view) on how to
    wpdatatables could help is in our particular application. This is what we are trying to accomplish:

    We have a database (1 flat table) with about 5 million rows. Each row
    represents data that would be imported into various pdf form fillable templates
    that our client can buy from us. These pdf's are predefined forms provided by others which we cannot modify others than completing the information on them. So our work flow would look like this:

    Step 1: Visitor to our site searches our database by inputting
    information about themselves (Name, DOB, etc) on a form.

    Step 2: Upon submitting the form a query is done against the database
    and returns the rows requested from the query (multiple rows can be
    returned). The rows are displayed on a second form that will allow the
    visitor to select which rows are to be exported to a predefined pdf
    template. The selection of that row is an action that indicates that the visitor want to purchase a pdf with the data in the row merged into the pdf.

    Step 3: Upon selecting the rows and submitting the form the visitor
    is directed to a payment gateway to pay for the completed forms.

    Step 4: After completing payment the visitor is directed to another
    form where he can submit some additional information and an email
    address where the forms are to be sent.

    Step 5: Upon submitting the form the data on the form is exported to
    E2PDF for merging to a form template. E2PDF merges the data and emails
    the form to the visitor.

    I see that Formidable Forms is integrated with wpdatatables so my general questions are:

    1. Can wpddatatables directly query a 5M row sql database using the back-end via a Formidable form where the visitor enters the sql dynamic variables? Or does wpdatatables have a form of some type that I can display so the visitor can enter the variables?

    2. Can the query to the database be written in away to prevent any sql injections (pdo, prepared statements, parameterized queries)?

    3. Can wpdatatables display those queries into a Formidable form (or other form) and use values from that table as the basis of a second query? So in my example, the initial search by the visitor returns 3 rows from the database. Each row now has a unique id number which I need to use as the unique identifier of the data that has to be merged on each of the different pdf's. So all the data from record id 1 goes on the first form,  then data from record id 2 goes on form 2 ......

    Ideally I visualize this as 5 forms:

    Form 1 provides input fields for the first query variables.

    Form 2 displays the results of the query from Form 1 in a table. On each row of the table the visitor can select (checkbox) the rows that he wants to purchase of pdf for. The table then calculates a price of the order ( example 3 pdf's at $10 each = $30). Visitor hits a submit button.

    Form 3 is the payment gateway that requires the $30 payment be made to proceed.

    Form 4 Visitor verifies personal information and provides email address to send the pdf's to.

    Form 5 has a table with identifying information for each form with a button for each row that when pressed generates the pdf which it then compiled (via E 2PDF) and sent to the visitor's email.

    I don't need a step-by-step tutorial on how to do the above. But I
    could use some broader guidance on how far you believe I can get through what I'm trying to do with your product and it's integration with Formidable Forms.

    I really appreciate your feedback.

  •  1,846
    Miloš replied

    Hi, Tony .

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    I am sorry to disappoint you, but this use-case will not be completely possible with wpDataTables and a Form Integration.

    1. The main issue here is that,

    if you connect the source Form with a table in our Plugin,

    this table in our Plugin does not  create a new SQL Table in your Database, so you won't be able to make easy SQL Queries from them,

    but i will elaborate a bit more :

    • These kinds of datatables such as tables linked to pull from a data source,

    such as Forms, or CSV/Excel, Google Sheets etc,

    they are not saved in the database like Manual tables,

     but instead, their data is stored in database table wp_wpdatatables_rows

    So, pulling data from the database for these tables is more complex because this database table stores data in serialized JSON format, not like manual tables (columns * rows).

    -

    We do have several built-in integrations with form plugins, though,

    they are :

    integration for Forminator Forms, ( a free add-on), 

    Formidable Forms integration;  

     and  Gravity Forms integration.

    So users can go on a WP Page where you have any of these Forms,

    they can input Data, but this just stores data as entires of the Form itself;

    and our Table only outputs this data,

    but it is not possible to make an easy SQL Query based Table from it, for the reasons explained above.

    -

    The only alternate approach for this is, if you would have your data for the table stored in the SQL Database.

    In this case, we have a premium add-on Powerful Filters;

    it has a feature to hide the table before the user makes a search / or uses some filters, depending how you set it up.

    Then after the user searches for something, the table will only load after that with their filtered result.

    More info on Powerful Filters here.

    You can also test the add-on on this Sandbox Demo site.

    -


    2. Select several rows that will be somehow output to next step, such as PDF;

    We do not currently have anything like this.

    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, the rest of the points, such as redirection to a Payment,

    and as you described "upon submitting the form the data on the form is exported to
    E2PDF for merging to a form template. E2PDF merges the data and emails
    the form to the visitor. " ;

    this is also not possible with our current plugin capabilities.

    You can suggest all these points for future development and follow our changeLog,

    but i can't say a realistic ETA if all this will be possible and when.


    Let me know if you have any further questions. Thank you.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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