{"id":278,"date":"2011-03-19T14:45:10","date_gmt":"2011-03-19T18:45:10","guid":{"rendered":"http:\/\/cfdbplugin.com\/?page_id=278"},"modified":"2016-12-15T21:55:20","modified_gmt":"2016-12-16T02:55:20","slug":"cfdb-count","status":"publish","type":"page","link":"https:\/\/cfdbplugin.com\/?page_id=278","title":{"rendered":"[cfdb-count]"},"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 border=\"1\" cellspacing=\"1\" cellpadding=\"1\" width=\"100%\" align=\"left\">\n<tbody>\n<tr>\n<td width=\"10%\" valign=\"middle\"><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 width=\"10%\" valign=\"middle\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#form\"><strong>form<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-count\u00a0<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 width=\"10%\" valign=\"middle\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#show\"><strong>show<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-count\u00a0form=\"myform\"\u00a0<strong>show=\"col1,col2\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">**Not applicable to this shortcode<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\" valign=\"middle\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#hide\"><strong>hide<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-count\u00a0form=\"myform\"\u00a0hide<strong>=\"col1,col2\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">**Not applicable to this shortcode<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\" valign=\"middle\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#limit\"><strong>limit<\/strong><\/a><\/td>\n<td width=\"40%\" align=\"left\" valign=\"middle\"><code>[cfdb-count\u00a0form=\"myform\"\u00a0<strong>limit=\"10\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">** Applicable only if you would want to limit the count to a maximum number.<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\" valign=\"middle\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#orderby\"><strong>orderby<\/strong><\/a><\/td>\n<td width=\"40%\" align=\"left\" valign=\"middle\"><code>[cfdb-count\u00a0form=\"myform\"\u00a0<strong>orderby=\"last-name,first-name\"<\/strong>]<\/code><\/td>\n<td width=\"40%\">**Not applicable to this shortcode<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\" valign=\"middle\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#search\"><strong>search<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-count\u00a0form=\"myform\"\u00a0search<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 width=\"10%\" valign=\"middle\"><a href=\"http:\/\/cfdbplugin.com\/?page_id=89#filter\"><strong>filter<\/strong><\/a><\/td>\n<td width=\"40\"><code>[cfdb-count\u00a0form=\"myform\"\u00a0filter<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<\/tbody>\n<\/table>\n<p><span style=\"font-size: 11px; line-height: normal;\"><br \/>\n<\/span><\/p>\n<p>Example: Want to simply count of the number of form entries received? Maybe you want to show how many people have signed your on-line petition?<\/p>\n<p><code>[cfdb-count form=\"your-form\"]<\/code><\/p>\n<p>Example:\u00a0Want to show vote counts?<\/p>\n<p><code>Yes Votes: [cfdb-count\u00a0form=\"your-form\" filter=\"vote=yes\"]<\/code><\/p>\n<div>\n<p><code><code>No Votes: \u00a0[cfdb-count\u00a0form=\"your-form\" filter=\"vote=no\"]<\/code><\/code><\/p>\n<p>&nbsp;<\/p>\n<p><code><\/p>\n<div><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;\">The same thing can be accomplished with the [cfdb-value] shortcode, this shortcode is really just an abbreviation. <\/span><\/div>\n<div><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;\">So:<\/span><\/div>\n<div>\n<p><code>[cfdb-count\u00a0form=\"your-form\"]<\/code><\/p>\n<div><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;\">Is equivalent to: <\/span><\/div>\n<\/div>\n<div>\n<p><code>[cfdb-value\u00a0form=\"your-form\" function=\"count\"]<\/code><\/p>\n<div><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;\">But there is a subtle difference with cfdb-value. With that shortcode, if you use any other function rather than \"count\" (like \"sum\" or \"max\") then you need to specify the column or columns that will be applied. Otherwise it will try to compute across all columns. So if you used \"count\" and specified two columns, you get the number of entries submitted times two. Not a useful example, but if you were using \"mean\" it would be. <\/span><\/div>\n<div><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;\"><br \/>\n<\/span><\/div>\n<\/div>\n<p><\/code>&nbsp;<\/p>\n<\/div>\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":4,"comment_status":"closed","ping_status":"closed","template":"page-without-sidebar.php","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-278","page","type-page","status-publish","hentry"],"jetpack_shortlink":"https:\/\/wp.me\/P1mptf-4u","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/278","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=278"}],"version-history":[{"count":15,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/278\/revisions"}],"predecessor-version":[{"id":1239,"href":"https:\/\/cfdbplugin.com\/index.php?rest_route=\/wp\/v2\/pages\/278\/revisions\/1239"}],"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=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}