• Resolved YuppiDu

    (@andreavecchi71)


    Hi, firstly: great work with this plugin!

    Secondly, I would like to implement the following use-case:
    – to publish a page that shows a certain view -> easy!
    – each record of the view should contain a “dynamic hyperlink” which should point directly to the data-entry form of a certain (also different) table

    In other words, I would like to leverage the dynamic hyperlinks functionality to generate URLs pointing to data-entry forms related to certain specific records belonging to tables managed by the plug-in itself.

    I noticed that the common URL of a data-entry form, for a table managed by the plug-in, looks like the following:

    <my_website_url>/wp-admin/admin.php?page=<my_page_id>&schema_name=<my_db_schema_name>&table_name=<my_table_name>

    where I don’t know “how to pass” a sort of “key value”, in order to “point” directly to a certain record of my table

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter YuppiDu

    (@andreavecchi71)

    Hi, by analyzing the HTML code generated by the plug-in, it seems that I found a kind of workaround to reach the goal, namely to add the following GET parameters to the URL that I mentioned in my original comment:

    &id=<my_table_key_value>&action=edit

    Just to recap, it seems that an URL built in the following way, can point to a data-entry form of a specific table row:

    <my_website_url>/wp-admin/admin.php?page=<my_page_id>&schema_name=<my_db_schema_name>&table_name=<my_table_name>&id=<my_table_key_value>&action=edit

    I hope that this will not be somehow dangerous ??

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Andrea,

    You can safely use the action argument. The plugin supports GET as well as POST. You just won’t be able to insert, update or delete rows directly from a link. For these actions you’ll need a wpnonce.

    You cannot add a wpnonce to a dynamic hyperlink. But you can navigate to the data entry form, presuming the users as the necessary credentials. If the user has access, the plugin generates a wononce when the data form is called. Just keep in mind that you’ll need a primary key value.

    Does this make sense…?

    Best regards,
    Peter

    Thread Starter YuppiDu

    (@andreavecchi71)

    Thank you Peter, in my use-case I don’t need to directly update/insert/delete records “via link”. I just need to bring the (authorized) user to the right data-entry form (the one related to the record that I have to update).
    So it seems that I solved… thank you very much!

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Your welcome Andrea! ?? I owed you that….

    I haven’t had the time yet to pick up the translation, but I look forward to it. Thanks again for that. I really appreciate it!

    Best regards,
    Peter

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dynamic hyperlink pointing to a data-entry form’ is closed to new replies.