{"id":419,"date":"2011-05-22T19:37:35","date_gmt":"2011-05-22T23:37:35","guid":{"rendered":"http:\/\/cfdbplugin.com\/?page_id=419"},"modified":"2016-12-15T21:55:29","modified_gmt":"2016-12-16T02:55:29","slug":"cfdb-export-link","status":"publish","type":"page","link":"https:\/\/cfdbplugin.com\/?page_id=419","title":{"rendered":"[cfdb-export-link]"},"content":{"rendered":"<p><span style=\"font-weight:bold; background-color:#FFFF99;\">This documentation applies to version 2.6 and later<\/span><\/p>\n<h1><strong>Summary of Shortcode Options<\/strong><\/h1>\n<table width=\"100%\" border=\"1\" cellspacing=\"1\" cellpadding=\"1\" align=\"left\">\n<tbody>\n<tr>\n<td valign=\"middle\" width=\"10%\"><strong>Option<\/strong><\/td>\n<td width=\"40\"><strong>Example<br \/>\n<\/strong><\/td>\n<td width=\"40%\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#form\"><strong>form<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-export-link <strong>form=\"myform\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Required. Designates the form to display. All rows and columns are displayed by default<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#role\"><strong>role<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-datatable form=\"myform\" <strong>role=\"Author\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Make short code only display output for user&#8217;s with minimum-required role. Choices are<\/p>\n<ul>\n<li>Administrator<\/li>\n<li>Editor<\/li>\n<li>Author<\/li>\n<li>Contributor<\/li>\n<li>Subscriber<\/li>\n<li>Anyone<\/li>\n<\/ul>\n<p><strong>WARNING<\/strong>: this setting is overridden by plugin setting in WP Admin page Contact -> Database Options -> Can See Submission when using shortcodes<br \/>\n(since 2.4.1)\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#show\"><strong>show<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-export-link form=\"myform\" <strong>show=\"col1,col2\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Limits columns to be shown to be those designated (comma-delimited list)<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#hide\"><strong>hide<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-export-link form=\"myform\" <span style=\"font-weight: bold;\">hide<\/span><strong>=\"col1,col2\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Does not show listed columns (comma-delimited list)<\/td>\n<\/tr>\n<p>tr><\/p>\n<td valign=\"middle\" width=\"10%\"><strong>header<\/strong><\/td>\n<td align=\"left\" valign=\"middle\" width=\"40%\"><code>[cfdb-table form=\"myform\" <span style=\"font-weight: bold;\">header<\/span><strong>=\"false\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Show or do not show the table header. Valid values are <strong>true<\/strong> (the default) and <strong>false<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a name=\"headers\"><\/a><strong>headers<\/strong><\/td>\n<td align=\"left\" valign=\"middle\" width=\"40%\"><code>[cfdb-table form=\"myform\" <span style=\"font-weight: bold;\">headers<\/span><strong>=\"your-name=Name,ex_field1=Email\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Allows you to change the name displayed in the table header. Map a form field names to a more readable display names. (Since 2.5.1)<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#limit\"><strong>limit<\/strong><\/a><\/td>\n<td align=\"left\" valign=\"middle\" width=\"40%\"><code>[cfdb-export-link\u00a0form=\"myform\"\u00a0<strong>limit=\"10\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">One number: limit=&#8221;10&#8243; means show first 10 rows. Is the same as limit=&#8221;0,10&#8243;<br \/>\nTwo Numbers: limit=&#8221;100,10&#8243; means show 10 rows starting at row #100)<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#random\"><strong>random<\/strong><\/a><\/td>\n<td align=\"left\" valign=\"middle\" width=\"40%\"><code>[cfdb-table form=\"myform\"\u00a0<strong>random=\"2\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Display 2 random rows from those that the short code finds. (Since 2.4)<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#orderby\"><strong>orderby<\/strong><\/a><\/td>\n<td align=\"left\" valign=\"middle\" width=\"40%\"><code>[cfdb-export-link\u00a0form=\"myform\"\u00a0<strong>orderby=\"last-name,first-name\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Sort rows by designated columns. Use &#8220;column-name desc&#8221; to sort in descending (reverse) order<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#search\"><strong>search<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-export-link\u00a0form=\"myform\"\u00a0<span style=\"font-weight: bold;\">search<\/span><strong>=\"Simpson\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Select rows to display that have any cell with the search text in it (case insensitive). Intended to mimic behavior of the &#8220;Search&#8221; field in the DataTable<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#filter\"><strong>filter<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-export-link form=\"myform\" <span style=\"font-weight: bold;\">filter<\/span><strong>=\"col1=Simpson\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Select which rows to display based on filter expression. More powerful than &#8220;search&#8221;, it can filter on multiple columns with boolean and regular expressions. If both &#8220;search&#8221; and &#8220;filter&#8221; are specified, &#8220;search&#8221; is ignored.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\" valign=\"middle\" width=\"10%\"><em>Options specific to this shortcode<\/em><\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><a href=\"#enc\"><strong>enc<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-export-link form=\"myform\" <span style=\"font-weight: bold;\">enc<\/span><strong>=\"CSVUTF8BOM\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">Set the encoding\/format of the export file. Options are:<\/p>\n<ul>\n<li><strong>xlsx<\/strong> (Excel)<\/li>\n<li><strong>ods<\/strong> (Open Document: used by <a href=\"https:\/\/www.libreoffice.org\/\" target=\"_blank\">LibreOffice<\/a> and <a href=\"https:\/\/www.openoffice.org\/\" target=\"_blank\">OpenOffice<\/a>)<\/li>\n<li><strong>CSVUTF8BOM<\/strong> (Excel CSV on Windows (Use CSVUTF8 on Mac): Comma-Separated Value, UTF-8 encoding with Byte Order Mark)<\/li>\n<li><strong>TSVUTF16LEBOM<\/strong> (Excel TSV: Tab-Separated Value, UTF-16 Little-Endian encoding with Byte Order Mark)<\/li>\n<li><strong>CSVUTF8<\/strong> (Plain CSV: Comma-Separated Value, UTF-8 encoding) Good for Excel on Mac or non-Excel spreadsheet applications<\/li>\n<li><strong>IQY<\/strong> (Excel IQuery file: UTF-8)<\/li>\n<\/ul>\n<p>If not specified, <strong>CSVUTF8<\/strong> is assumed.<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><strong><a href=\"#urlonly\">urlonly<\/a><\/strong><\/td>\n<td width=\"40\"><code>[cfdb-export-link form=\"myform\"\u00a0<span style=\"font-weight: bold;\">urlonly<\/span><strong>=\"true\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">By default an HTML anchor tag is output to make a clickable link. setting urlonly=&#8221;true&#8221; makes the shortcode only output the URL text<\/td>\n<\/tr>\n<tr>\n<td valign=\"middle\" width=\"10%\"><strong><a href=\"#linktext\">linktext<\/a><\/strong><\/td>\n<td width=\"40\"><code>[cfdb-export-link form=\"myform\"\u00a0<span style=\"font-weight: bold;\">linktext<\/span><strong>=\"Download\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">By default an HTML anchor tag that is output is labeled &#8220;Export&#8221;. Use this option to change the text of that link.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Use <code>[cfdb-export-link form=\"your-form\"]<\/code> with optional <code>show<\/code>, <code>hide<\/code> and <code>filter<\/code> just like<code>[cfdb-table]<\/code>.<\/p>\n<p>The purpose of this tag is to output an HTML link which, when clicked, will download a file in a CSV or related format. This is the same as the export options available in the Database page in the WP admin area.<\/p>\n<p><strong>WARNING<\/strong>: When clicking your link, you will get a &#8220;<strong>Permission Denied<\/strong>&#8221; error unless the user has permission to see data according to the &#8220;<strong>Can See Submission data<\/strong>&#8221; option (see Database Options page). When a user has this access, he can then hand-craft URLs to download any and all data from any form in your database. Setting this option to &#8220;Anyone&#8221; opens up a security hole where any savvy user can construct URLs to see all the submitted form data you have. So use this option with care.<\/p>\n<p>Some people wish to have only those results downloaded that are associated with a specific user. That can be accomplished. See the <a href=\"http:\/\/cfdbplugin.com\/?page_id=116\">page on filter variable substitution using\u00a0$user_login<\/a>. But note that although the short code link only shows that user&#8217;s data, a savvy user can change the link to see other data. The security options in the plugin&#8217;s Options panel allow one to set what level of user can see data (Administration, Editor, etc.) but this is a all-or-nothing proposition. Users that can see data can see all the data. And hacking the URL output by this short code is an easy way to see data that was not intended by a shortcode.<\/p>\n<p>&nbsp;<\/p>\n<p><a name=\"enc\"><\/a>Use <span style=\"font-family: monospace;\">enc<\/span> to indicate output file format. The choices are described above.<\/p>\n<p>&nbsp;<\/p>\n<p><a name=\"urlonly \"><\/a>Use <span style=\"font-family: monospace;\">urlonly<\/span> to only output the URL to the export instead of an HTML A tag.<\/p>\n<p>&nbsp;<\/p>\n<p><a name=\"linktext \"><\/a>Use <span style=\"font-family: monospace;\">linktext<\/span> to change the label for the HTML A tag. By default the label is &#8220;Export&#8221;, for example:<br \/>\n&lt;a href=&#8221;http:\/\/&#8230;.&#8221;&gt;Export&lt;\/a&gt;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary of Shortcode Options Option Example Description form Required. Designates the form to display. All rows and columns are displayed by default role Make short code only display output for user&#8217;s with minimum-required role. Choices are Administrator Editor Author Contributor Subscriber Anyone WARNING: this setting is overridden by plugin setting in WP Admin page Contact [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1577,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"page-without-sidebar.php","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-419","page","type-page","status-publish","hentry"],"jetpack_shortlink":"https:\/\/wp.me\/P1mptf-6L","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=419"}],"version-history":[{"count":22,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/419\/revisions"}],"predecessor-version":[{"id":1428,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/419\/revisions\/1428"}],"up":[{"embeddable":true,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/1577"}],"wp:attachment":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}