Title: Not compatibility between shortcode
Last modified: October 19, 2017

---

# Not compatibility between shortcode

 *  [univ182](https://wordpress.org/support/users/univ182/)
 * (@univ182)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/not-compatibility-between-shortcode/)
 * Hello guys:
 * I’m using the next shortcodes:
 * [dynamichidden cf7-counter “CF7_counter”]
    [dynamichidden nombretecnico “CF7_get_current_user
   key=’display_name'”]
 * The counter that I use, the code in the functions.php is:
 *     ```
       //Define the key to store in the database
       define( 'CF7_COUNTER', 'cf7-counter' );
   
       //Create the shortcode which will set the value for the DTX field
       function cf7dtx_counter(){
           $val = get_option( CF7_COUNTER, 0) + 1;  //Increment the current count
           return $val;
       }
       add_shortcode('CF7_counter', 'cf7dtx_counter');
   
       //Action performed when the mail is actually sent by CF7
       function cf7dtx_increment_mail_counter(){
           $val = get_option( CF7_COUNTER, 0) + 1; //Increment the current count
           update_option(CF7_COUNTER, $val); //Update the settings with the new count
       }
       add_action('wpcf7_mail_sent', 'cf7dtx_increment_mail_counter');
       ```
   
 * First I used the next shortcodes: [dynamichidden cf7-counter “CF7_counter”]
    [
   dynamichidden nombretecnico “CF7_get_current_user”]
 * The counter worked fine, but when I added key=’display_name” to CF7_get_current_user,
   the counter It stopped working.
 * How can I fix it?
 * Thanks guys for this plugin, awesome.

The topic ‘Not compatibility between shortcode’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7-dynamic-text-extension/assets/icon-256x256.
   png?rev=3019574)
 * [Contact Form 7 - Dynamic Text Extension](https://wordpress.org/plugins/contact-form-7-dynamic-text-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-dynamic-text-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-dynamic-text-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-dynamic-text-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-dynamic-text-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-dynamic-text-extension/reviews/)

## Tags

 * [contact](https://wordpress.org/support/topic-tag/contact/)
 * [form](https://wordpress.org/support/topic-tag/form/)
 * [hidden](https://wordpress.org/support/topic-tag/hidden/)
 * [key](https://wordpress.org/support/topic-tag/key/)

 * 0 replies
 * 1 participant
 * Last reply from: [univ182](https://wordpress.org/support/users/univ182/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/not-compatibility-between-shortcode/)
 * Status: not resolved