Title: Shortcode for form count returns &#039;0&#039;
Last modified: August 30, 2016

---

# Shortcode for form count returns '0'

 *  [siriusly](https://wordpress.org/support/users/siriusly/)
 * (@siriusly)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/)
 * Hello —
    For some reason I can only get the [cfdb-count form=”myformname”] shortcode
   to work with one of my forms. Both forms have entries. The one displaying “0”
   currently has 4 entries.
 * Here is the screenshot: [https://www.sim-eplc.org/wp-content/uploads/Screen-Shot-2015-09-15-at-11.37.32-AM.png](https://www.sim-eplc.org/wp-content/uploads/Screen-Shot-2015-09-15-at-11.37.32-AM.png)
 * Here is a link to test page: [http://bit.ly/1MpyyWR](http://bit.ly/1MpyyWR)
    
   Here are shortcodes(first one returns ‘0’ — 2nd one returns correct count):
 *     ```
       <strong>Number of Registrations:</strong> [cfdb-count form="Registration - Multi-disciplinary Team Based Models - Oct. 7, 2015"]
   
       <strong>Number of Registrations:</strong> [cfdb-count form="Registration - Learning Community Kickoff Event"]
       ```
   
 * Many thanks for your help!
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548664)
 * If you change the short code to cfdb-table doe it show results?
 *  Thread Starter [siriusly](https://wordpress.org/support/users/siriusly/)
 * (@siriusly)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548765)
 * Yes.
    Could it possibly be that the short code doesn’t like the date in the form
   title? The form that works with cfdb-count doesn’t have a date in the title —
   5 others that do have dates do not work. Just a thought…
 * This code works beautifully:
 * `[cfdb-table form="Registration - Multi-disciplinary Team Based Models - Oct.
   7, 2015" show="First-Name,Last-Name,Organization,TitlePosition,from_email,Phone,
   sector,Other-Sector,trained-as-Community-Health-Worker,trained-as-a-Community-
   Paramedic,Community-Health-Workers,Community-Paramedics,Dietary-Needs,Accessibility-
   Needs,learning-teams,Signature,Date" role="Editor" permissionmsg="true" headers
   ="First-Name=First,Last-Name=Last,Organization=Org,TitlePosition=Title,from_email
   =Email,Phone=Phone,sector=Sector,Other-Sector=Sector,trained-as-Community-Health-
   Worker=CHW Trained,trained-as-a-Community-Paramedic=CP Trained,Community-Health-
   Workers=Org has CHWs,Community-Paramedics=Org has CPs,Dietary-Needs=Diet,Accessibility-
   Needs=Access,learning-teams=Teams,Signature=Sig,Date=Date"]`
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548772)
 * I think there is a bug. Probably due to the comma in the form name. Can you change
   the name of the form?
 *  Thread Starter [siriusly](https://wordpress.org/support/users/siriusly/)
 * (@siriusly)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548821)
 * Thought it might be something like that. Yes, I can change form names, though
   with first try it looks like FS Contact Form changes the displayed title but 
   not the database title, so will need to edit the database, unless you know of
   another route. I’d make new forms & duplicate settings, but there are already
   numerous entries being recorded in the current ones. Will let you know if changing
   names does the trick. Thank you!
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548822)
 * You can change the form name via PHPMyAdmin.
 * Assuming your new form name is “Multi-disciplinary Team Based Models – Oct. 7
   2015”
 * Execute SQL:
 *     ```
       update wp_cf7dbplugin_submits
       set
       form_name = 'Multi-disciplinary Team Based Models - Oct. 7 2015'
       where
       form_name = 'Multi-disciplinary Team Based Models - Oct. 7, 2015'
       ```
   
 *  Thread Starter [siriusly](https://wordpress.org/support/users/siriusly/)
 * (@siriusly)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548825)
 * Thanks!! That worked great for changing the form names and now the submissions&
   count for the newly named forms are displaying properly from the shortcodes.
 * This brings up another question, then:
    Submissions to the forms with the original
   names now live in a separate list in the CFDB admin (so, for example — the form
   with the new name displays 1 record; the form with the old name shows 6 submissions).
   Is there a way to merge the two sets form submissions from CFDB admin, or should
   I do it with PHPAdmin?
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548826)
 * I thought that is what we are doing. Use the query to change the old form name
   to the new form name so that old and new submissions appear under the same title.
 * If your new form has a different title, use the query again, changing the form_name
   values as desired.
 *  Thread Starter [siriusly](https://wordpress.org/support/users/siriusly/)
 * (@siriusly)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548827)
 * Got it! Thanks!!
 * Okay, one final question… is there a way to avoid duplicate submissions, testing
   for email address?
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548828)
 * I have an [example of this for Contact Form 7](http://cfdbplugin.com/?page_id=904)
   so that it gives an error on the submission page to the user. But I don’t have
   an example for FSCF. You would have to ask on the FSCF forum if there is a hook
   for data validation then code something similar.
 *  Thread Starter [siriusly](https://wordpress.org/support/users/siriusly/)
 * (@siriusly)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548829)
 * Great! I can work with that. Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Shortcode for form count returns '0'’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [siriusly](https://wordpress.org/support/users/siriusly/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/shortcode-for-form-count-returns-0/#post-6548829)
 * Status: not resolved