Last updated Dec 8, 2017

Showing the config screen on initial load only

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':

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

    1
    2
    AJS.gadget.fields.nowConfigured()
    
  3. Or, if that is not available:

    1
    2
    {
      userpref: "isConfigured",
      type: "hidden",
      value: "true"
    }
    

Gadget Developers' JavaScript Cookbook
Using the Atlassian Gadgets JavaScript Framework

Rate this page: