Okay
  Public Ticket #2906819
Query String
Closed

Comments

  • Anthony Silver started the conversation

    1. On URL1 a new record has been inserted into a mysql table using Gravity Forms + GF WPDB Add on. 

    2. On Submit, URL1 is redirected (using Confirmations) to a new page and a querystring is added  (blah.com/confirm/?fred=21) where 21 is the value of the field Fred.

    3I wish to display a table in URL2 using WPData Tables where the field to be displayed is dynamically populated using the SQL   'Select  [textcomment] from datatable where record_ID= [fred]  eg the value of the querystring 'fred'


    My question is  (a) Can I do this using WPData tables and (b) what is the format used in the query to pick up the QS value.

  • [deleted] replied

    Hi Anthony

    Thank you for reaching out to us.

    You want an entry from the table as a hyperlink that would take the visitor to the specific post or page? That link would be dynamically generated by the content of the cell, right? 

    If that's true, you could use the CONCAT function, like this: 

    SELECT column1,column2,       
    CONCAT('<a href="www.yourwebsite.com/page1/',yourTable.column3,'">',yourtable.column3,'</a>') 
    AS HyperlinkFROM yourTable 

    This will create a hyperlink to www.yourwebsite.com/page1/value1 if there's "value1" entered as cell data in column3. On another row, it could be www.yourwebsite.com/page1/value2 if there's "value2" in the cell, and so on. So, this would be a hyperlink which could be shown in the modal, and it would take the user to the respective page.

    I hope this helps, do let us know if you need any further assistance.

  • Anthony Silver replied

    Hey Blazenka

    Thanks for the response.  Sorry but your response is not what I am looking for.

    I have built a Figma model (https://www.figma.com/proto/rYS0f1NRHzEfosP0K7oGOp/CRM-Posts?node-id=47%3A506&scaling=min-zoom&page-id=0%3A1&starting-point-node-id=47%3A506).  Click the Amend (Linkedin) Post and the next screen generates a list of records in summary.   If you click one of the items it then opens a detailed page which is populated by the selected record.  These fields can then be amended and submitted.  I am trying to get Gravity Forms or a plugin/addon to allow me to build these pages.  

  • [deleted] replied

    Hi Anthony

    I'm afraid the closest you can get to achieving this is with our Master Detail addon that would allow you to display the row data of the table on a separate page. Please have a look at our documentation for more detailed information about this addon, I hope you will find it useful. https://wpdatatables.com/documentation/addons/master-detail-tables/

  • Anthony Silver replied

    Thanks Blazenka

  • [deleted] replied

    You are most welcomesmile.png

    If there is anything else we can assist you with please don't hesitate to open a new ticket.

    Have a wonderful day!