Is there any way to have a column that allows custom html with a variable pulled from the same database entry? E.g. I want to put a link to a form in the row of each entry of wordpress posts, and I need to pull the the post ID and put it in html:
<a> href="mysite.com/form/?id=%POSTID%">Edit</a>
I would like to have a column that contained this html for each entry. Is that possible?
The plugin has the ability to create 'Add Formula Column', inserting data from other columns into a mathematical formula and displaying the answer. I want something like this, only instead instead of math, I want to add a column that pulls data from other columns and displays it using html tags. For instance, if the data in a column 1 is a number (e.g. 123), I want to create a column 2 that uses that number inside to display a link (e.g. https:/mysite.org/123). My html would look like:
<a href='https:/mysite.org/(col1)'>Link to Post (col1)</a>
The variable (col1) is the data from column 1. Each row in column 2 would display a different link based on the data pulled in column 1.
It appears the plugin cannot do this, so I suppose this is a feature request. Since you have already implemented a similar feature with the 'Add Formula Column' button, it shouldn't be too hard to add an 'Add HTML Column' button.
Can you please take a look at this video, where my senior colleagues show an example of using SQL Queries in our plugin, to use the CONCAT functionality;
They made an example by adding a URL link, along with some variable values from certain columns through an SQL Query.
I am not sure if we can use placeholder such as %POSTID% in this way , but perhaps this might be useful for you, to devise a workaround, i hope.
Please check out the video here
Let me know how that seems.
I will check with senior colleagues again if it's possible to use the POST ID placeholder in the way how you described, thank you for further clarification.
As soon as they respond i will report back again for you.
Thanks Milos, I think I can make this work. But I still think it would be a great feature to be able to do this in a more user-friendly way, without having to know SQL commands -- as in the 'Add Formula Column' feature.
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.
Is there any way to have a column that allows custom html with a variable pulled from the same database entry? E.g. I want to put a link to a form in the row of each entry of wordpress posts, and I need to pull the the post ID and put it in html:
<a> href="mysite.com/form/?id=%POSTID%">Edit</a>
I would like to have a column that contained this html for each entry. Is that possible?
Hi, Scott
Sorry for the delay
To be fully honest with you, i am not sure if i understood all the details exactly and it seems a bit higher then my level of expertise.
You can certainly use custom HTML in the cells of wpDataTables. Please check out more on how our string columns work here.
But i will have to check with senior colleagues if this is possible to achieve exactly as you described it.
Sorry for the waiting time.
If you could be so kind to perhaps elaborate a bit more, and if you have any example to show us - it will help. 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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
The plugin has the ability to create 'Add Formula Column', inserting data from other columns into a mathematical formula and displaying the answer. I want something like this, only instead instead of math, I want to add a column that pulls data from other columns and displays it using html tags. For instance, if the data in a column 1 is a number (e.g. 123), I want to create a column 2 that uses that number inside to display a link (e.g. https:/mysite.org/123). My html would look like:
<a href='https:/mysite.org/(col1)'>Link to Post (col1)</a>
The variable (col1) is the data from column 1. Each row in column 2 would display a different link based on the data pulled in column 1.
It appears the plugin cannot do this, so I suppose this is a feature request. Since you have already implemented a similar feature with the 'Add Formula Column' button, it shouldn't be too hard to add an 'Add HTML Column' button.
Hi, Scott
Sorry for the delayed response
-
Can you please take a look at this video, where my senior colleagues show an example of using SQL Queries in our plugin, to use the CONCAT functionality;
They made an example by adding a URL link, along with some variable values from certain columns through an SQL Query.
I am not sure if we can use placeholder such as %POSTID% in this way , but perhaps this might be useful for you, to devise a workaround, i hope.
Please check out the video here
Let me know how that seems.I will check with senior colleagues again if it's possible to use the POST ID placeholder in the way how you described, thank you for further clarification.
As soon as they respond i will report back again for you.
Thank you for all the patience.
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Thanks Milos, I think I can make this work. But I still think it would be a great feature to be able to do this in a more user-friendly way, without having to know SQL commands -- as in the 'Add Formula Column' feature.
Thanks,
Scott
Hi, Scott
I am glad that this might help achieve what you need at this time.
But i absolutely understand what you mean, this does require certain knowledge of SQL,
it would be much easier to have a built-in feature as you described.
If you can be so kind, 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.
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi, Scott
I just wanted to add something.
The developers took another look at everything, and they advised me of an alternate way, what you could try, if you wish.
I know we said that the goal was to get to a more user-friendly built-in solution, and this is certainly not that;
but i will pass the workaround anyway, if there is a chance that it might be helpful.
-
You can try making two same columns ( for example post ID if that is what you need);
then the second column you can set to be String type even though it has numbers,
then you could use a filter,
that you can add in your functions.php file of the theme or child theme;
You would replace tableId == *1* with ID of your table.
This would be a filter that can 'transform' all the string type cells.
-
I am not sure if this will help, but just wanted to additionally pass the advise from our developers.
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Thanks, Milos, this is helpful.
Hi Scott
No problem at all
If you have any other questions, please don't hesitate to open a new ticket.
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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