Skip to end of metadata
Go to start of metadata

This page is part of the Gadget Developers' JavaScript Cookbook.

How do I show the config screen on initial load only?

Include the isConfigured userpref defaulted to 'false' and include the nowConfigured field in your config descriptor. On first save, the userpref will be set to true and from then on, the view screen will be shown on gadget load:

  1. Include the isConfigured userpref defaulted to 'false':

    <UserPref name="isConfigured" datatype="hidden" default_value="false" />
  2. Include the following field in your config descriptor:

  3. Or, if that is not available:

      userpref: "isConfigured",
      type: "hidden",
      value: "true"


Gadget Developers' JavaScript Cookbook
Using the Atlassian Gadgets JavaScript Framework

  • No labels


  1. Unknown User (sy1662001)

    but when i test like this :

    <UserPref name="isConfigured" datatype="hidden" default_value="false" />



    <UserPref name="isConfigured" datatype="hidden" default_value="false" />

    Unknown macro: { userpref}

    when i refresh the gadget, the gadget still go to config page ?  who can help me???

    1. I have the same problem, can any guy give a solution?

  2. My problem is fixed, I made a mistake by putting <UserPref /> inside <ModelPrefs/>, please check if you made the same mistake as mine.

    I think this issue happens because the "isConfigured" is not saved correctly, it is always "false", so the gadget will always ask you to config it after refresh. Also check the config: fields options if you didn't make the same mistake as mine.