Title: default:shortcode_attr and multiple values
Last modified: April 16, 2020

---

# default:shortcode_attr and multiple values

 *  Resolved [llago](https://wordpress.org/support/users/llago/)
 * (@llago)
 * [6 years ago](https://wordpress.org/support/topic/defaultshortcode_attr-and-multiple-values/)
 * Hello,
    for a project I am massively using default:shortcode_attr for a huge 
   form. The only problem: seems that in that mode, multiple values are not supported.
 * Example:
    I have a multi checkboxes like this: `[checkbox* your-mood use_label_element
   default:shortcode_attr]` This is dinamically populated with values, for example[
   1] => “happy” [2] => “sad” [3] => “medium” [4] => “whatever”
 * I CAN set “sad” as default like this `[contact-form-7 id="1859" title="My form"
   your-mood="2"]`
    but I CANNOT set multiple values. I tried multiple syntaxes 
   but analyzing the code there is no string split of any kind. Those examples that
   I tried but are NOT working: `[contact-form-7 id="1859" title="My form" your-
   mood="2_3"]` `[contact-form-7 id="1859" title="My form" your-mood="2,3"]` `[contact-
   form-7 id="1859" title="My form" your-mood="2" your-mood="3"]`
 * Am I missing something?

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

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [6 years ago](https://wordpress.org/support/topic/defaultshortcode_attr-and-multiple-values/#post-12686269)
 * See [Checkboxes, radio buttons, and menus](https://contactform7.com/checkboxes-radio-buttons-and-menus/)
 * You can do it like this:
 * `[checkbox* your-mood use_label_element default:2_3 "happy" "sad" "medium" "whatever"]`
 *  Thread Starter [llago](https://wordpress.org/support/users/llago/)
 * (@llago)
 * [6 years ago](https://wordpress.org/support/topic/defaultshortcode_attr-and-multiple-values/#post-12687670)
 * Hi! Thanks for your answer!
    I can’t do it like this, because I’m dinamically
   generating the shortcode with default values changing based on some computation.
   My work around was to assign a comma separated value to a hidden field, and fill
   up the checkboxes using JS.

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

The topic ‘default:shortcode_attr and multiple values’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [llago](https://wordpress.org/support/users/llago/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/defaultshortcode_attr-and-multiple-values/#post-12687670)
 * Status: resolved