Title: Button Issue
Last modified: August 31, 2016

---

# Button Issue

 *  [joeldault](https://wordpress.org/support/users/joeldault/)
 * (@joeldault)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/button-issue-4/)
 * Good Morning Michael
    You have been so helpful in the past and I hate to have
   to ask more of you, however I have been working on this for two days and can 
   two get it to work. Below is a script that you helped me come up with. It works
   great, but I need it so do one more thing. I need the script to show and work
   only when a filed in the data base is not empty. The name of the field is “commitment3”
   I want the button to show and work only when the field has a value in it and 
   not show when it is empty. I put an extra space “http:// ptia” so the script 
   would show here. Thanks
 * <script type=”text/javascript”>
    (function ($) { $(‘td[title=”submit_time”] div’).
   each( function () { $(this).html(‘[<button style=”background-color:#C0C0C0; color: 000000; font-size: 09px; border-radius: 10px; width: 80px; height: 25px”>Click Here!</button>](http:// ptia.net/?p=1308&submit_time=&apos; + $(this).html() + &apos;)‘);})})(
   jQuery); </script>
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

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

 *  Thread Starter [joeldault](https://wordpress.org/support/users/joeldault/)
 * (@joeldault)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/button-issue-4/#post-7232729)
 * <script type=”text/javascript”>
    (function ($) { $(‘td[title=”submit_time”] div’).
   each( function () { $(this).html(‘.a href=”[http://ptia.net/?p=1308&submit_time=&#8217](http://ptia.net/?p=1308&submit_time=&#8217);
   + $(this).html() + ‘” ><button style=”background-color:#C0C0C0; color: 000000;
   font-size: 09px; border-radius: 10px; width: 80px; height: 25px”>Click Here!</
   button>’); }) })(jQuery); </script>
 * I changed “‘<a” to “.a” to get the script to show. I hope is worked
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/button-issue-4/#post-7232829)
 * Please format at code when you post jQuery so it is easier to read.
 * You might be able to just change:
    `$('td[title="submit_time"] div').each(`
 * to:
    `$('td[title="submit_time"] div:not(:empty)').each(`

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

The topic ‘Button Issue’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/button-issue-4/#post-7232829)
 * Status: not resolved