Title: Custom id in shortcode ?
Last modified: May 29, 2017

---

# Custom id in shortcode ?

 *  Resolved [Nokaa](https://wordpress.org/support/users/nokaa/)
 * (@nokaa)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/custom-id-in-shortcode/)
 * Hi,
 * I wonder if it was possible to add or change the id of the form that is used 
   in the shortcode ?
 * I’ve a lot of forms that need to be called in a template of a lot of posts, the
   content depends on a specific term like “A01”, “A02” etc. I want to use thoses
   terms as ID for my forms in order to call a variable in the shortcode in the 
   template file.
 * Thank you in advance.
    -  This topic was modified 8 years, 11 months ago by [Nokaa](https://wordpress.org/support/users/nokaa/).

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

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/custom-id-in-shortcode/#post-9176114)
 * I’m not sure if I understand your situation, but I guess these might be helpful:
    - FAQ > [Can I add id and class attributes to a form element?](https://contactform7.com/faq/can-i-add-id-and-class-attributes-to-a-form-element/)
    - [Getting Default Values from Shortcode Attributes](https://contactform7.com/getting-default-values-from-shortcode-attributes/)
 *  Thread Starter [Nokaa](https://wordpress.org/support/users/nokaa/)
 * (@nokaa)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/custom-id-in-shortcode/#post-9176185)
 * Hm… No it can’t really help. :/
 * I think the only way I can do what I need is by being able to change the “id”
   of a form (the back-end id, not the front-end id). Actually they’re generated
   automatically when saving a new form, and there’s no way to change them.
 * Thank you anyway.
    -  This reply was modified 8 years, 11 months ago by [Nokaa](https://wordpress.org/support/users/nokaa/).
 *  Thread Starter [Nokaa](https://wordpress.org/support/users/nokaa/)
 * (@nokaa)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/custom-id-in-shortcode/#post-9176496)
 * Oops, can’t edit.
    I created a little plugin with tons of cases in a switch that
   connect CF ids with my terms, it was longer but my problem is resolved.

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

The topic ‘Custom id in shortcode ?’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Nokaa](https://wordpress.org/support/users/nokaa/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/custom-id-in-shortcode/#post-9176496)
 * Status: resolved