Title: Default Parameter Values
Last modified: October 16, 2019

---

# Default Parameter Values

 *  Resolved [MACscr](https://wordpress.org/support/users/macscr/)
 * (@macscr)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/default-parameter-values/)
 * This is a great little plugin, but it would really be nice if it possible to 
   set defaults for parameters. This way when the user hits the shortcoder button
   and the parameter input fields popup, they are populated with a default value
   that of course can be edited.
 * Also, while I have your attention, what is the status of the supporting js/css
   links? Right now I have to enqueue in the themes functions.php and of course 
   that happens on every page load. =/

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

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12077195)
 * Hi [@macscr](https://wordpress.org/support/users/macscr/),
 * Sorry for the late reply.
 * Thanks for the feedback. This is one most request feature. There is a backward
   compatible way to implement “default values” for custom parameter but I didn’t
   get a chance to implement that yet. Please expect this feature within couple 
   of months.
 * Regarding supporting custom JS/CSS it is something beyond the scope of the plugin’s
   motive but yet I’ll consider the possibilities based on the efforts needed.
 * Thanks,
    Aakash
 *  Thread Starter [MACscr](https://wordpress.org/support/users/macscr/)
 * (@macscr)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12458927)
 * Any update on those default values? Really needing that. Also, why limit the 
   type of html is used within it? I dont see a reason not to allow css/js links.
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12463275)
 * [@macscr](https://wordpress.org/support/users/macscr/),
 * I’ll make sure that the next version has support for default values.
 * Also there is no restriction on HTML/CSS/JS.
    Can you please detail on what issue
   you are seeing ? May be you can start a new thread for this discussion.
 *  Thread Starter [MACscr](https://wordpress.org/support/users/macscr/)
 * (@macscr)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12533646)
 * I must be blind and i see that you added the feature, but i see no instructions
   on setting default parameter values.
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12533978)
 * You can simply use the “insert shortcode parameter” button to set default values
   for the custom parameter.
 * [https://i.snipboard.io/HXTJvw.jpg](https://i.snipboard.io/HXTJvw.jpg)
 * The format for default values is `%%my_param:default value%%`
 * I’ll update the docs shortly.
 * Thanks,
    Aakash
 *  Thread Starter [MACscr](https://wordpress.org/support/users/macscr/)
 * (@macscr)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12533984)
 * Awesome. Exactly what I needed. Thanks!
 * I think I missed it when testing because I accidentally did custom field versus
   custom parameter.
 *  Thread Starter [MACscr](https://wordpress.org/support/users/macscr/)
 * (@macscr)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12537435)
 * Ah man, didnt realize that this doesnt create default values in the actual visual
   editor portion. Thats where it should be setting the default values. This way
   when the user is adding the shortcodes using the visual editor button and all
   the fields are present for the custom parameters, they will have defaults that
   they can change if needed, etc.
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12537470)
 * [@macscr](https://wordpress.org/support/users/macscr/),
 * hmm.. I didn’t quite understand. Let me explain how default values for custom
   parameter works.
 * In shortcode content you place custom parameter with default values like this`%%
   my_param:hello%%`. While inserting the shortcode in the post, you set a value
   for this `my_param` like this `[sc name="test" my_param="world"]`
 * In this case, `my_param` will be replaced with `world`.
    If you don’t provide
   any value i.e `[sc name="test"]` then the output will be `hello` which is the
   default value since no value is provided when the shortcode is used.
 *  Thread Starter [MACscr](https://wordpress.org/support/users/macscr/)
 * (@macscr)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12537480)
 * I get that, but for good user experience, they really should be populated here
   instead. Ive provided a screenshot of what I mean: [https://www.screencast.com/t/BMHKhwf09](https://www.screencast.com/t/BMHKhwf09)
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12537509)
 * [@macscr](https://wordpress.org/support/users/macscr/) That is not possible.
 * You can have the same custom parameter with “different” default values.
    In that
   the default value can’t be populated in the insert shortcode window.
 * i.e when shortcode contains `%%my_param:hello%% and %%my_param:world%%` though
   the parameter is only one (my_param) it has two/more default values.
 *  Thread Starter [MACscr](https://wordpress.org/support/users/macscr/)
 * (@macscr)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12537521)
 * That makes zero sense. Thats not how defaults work typically. If someone wanted
   to have different default values, they would use two different custom parameters.
   That isn’t a proper use case at all and makes no logical sense.

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

The topic ‘Default Parameter Values’ is closed to new replies.

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [MACscr](https://wordpress.org/support/users/macscr/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/default-parameter-values/#post-12537521)
 * Status: resolved