Axure Docs
  • Axure RP Reference
  • Axure RP Tutorials
  • Axure Cloud Reference
  • Axure Support
  • Download

›Complex Interactions

The Basics

  • Interactive Button
  • Hiding and Showing Widgets
  • Pass Text to Next Page
  • Anchor Link
  • Embedding Media
  • Full Width Image or Banner
  • Scrolling Region
  • Rotating Carousel / Slideshow
  • Navigation Menu
  • Tooltips
  • Tab Menu
  • Accordion Menu
  • Drag and Drop

Complex Interactions

  • Account Login
  • Auto Tab Fields
  • Blinking Text
  • Dynamically Set Droplist Options
  • Set Text with Droplist
  • Required Fields
  • Scroll Activated Sticky Header
  • Set Dynamic Panel State on Next Page
  • Slider Control
  • Terms and Conditions
  • Timer

Mobile Patterns

  • Swiping Slideshow
  • Toggle Switch

Set Dynamic Panel State on Next Page Tutorial

In this tutorial, you'll learn how to use a global variable to set the state of a dynamic panel based on a selection made on a previous page in the prototype.

Note

Click here to download the completed RP file for this tutorial.

1. Widget and Page Setup

Page 1 – The Selection Form

  1. Open a new RP file and open Page 1 on the canvas.

  2. Drag a droplist widget and a button widget onto the canvas from the Libraries pane.

  3. Set the button's text to Next Page.

  1. Double-click the droplist to edit its options.

  2. In the dialog that appears, click Add three times to create three new options. Make one Red, one Yellow, and one Blue.

Page 2 – The Dynamic Panel

  1. Add a new page to the project and open it on the canvas.

  2. Drag three rectangle widgets onto the canvas. Give one a red fill color, one a yellow fill color, and one a blue fill color.

  3. Right-click the red rectangle and select Create Dynamic Panel in the context menu.

  4. In the Outline pane, rename the dynamic panel's first state to Red.

    Note

    The dynamic panel's state names must match the options in the droplist widget on Page 1.

  5. Give the dynamic panel two new states. Name one Yellow and the other Blue.

  6. In the Outline pane, drag the yellow rectangle widget into the Yellow panel state. Then, move it to (0,0) on the canvas. Repeat this for the blue rectangle widget.

2. Create a Global Variable to Store the User's Selection

  1. In the top menu, go to Project → Global Variables.

  2. In the Global Variables dialog, click Add to add a new variable. Name it ColorVar.

  3. Click OK to close the dialog.

3. Capture the User's Input and Go to the Next Page

Set the Variable's Value to the Droplist's Selection

  1. Open Page 1 on the canvas and select the droplist widget.

  2. Click New Interaction in the Interactions pane.

  3. Select the Selection Changed event in the list that appears, and then select the Set Variable Value action.

  4. Select the ColorVar variable in the Target dropdown.

  5. In the Set To dropdown, select selected option of.

  6. Leave This selected in the Widget dropdown, and click OK to save the action.

Open Link to Page 2

  1. Select the button widget and click Click or Tap → Open Link in the Interactions pane.

  2. Select Page 2 in the Link To drodown and click OK to save the action.

4. Set the Dynamic Panel's State to the Variable's Value

  1. Open Page 2 and click a blank spot on the canvas to select the page itself. Then click New Interaction in the Interactions pane.

  2. Select the Page Loaded event in the list that appears, and then select the Set Panel State action.

  3. Select the dynamic panel in the Target dropdown.

  4. In the State dropdown, select Value. Then click the fx icon next to the field that appears to open the Edit Value dialog.

  5. Delete the text in the upper field of the dialog, and then click Insert Variable or Function.

  6. In the dropdown that appears, select ColorVar under the Global Variables heading. The field at the top of the dialog should now read: [[ColorVar]]. (This bracketed expression will be replaced by the variable's value in the web browser.)

    Note

    We're able to set the state of the dynamic panel to the droplist's selected option — which is stored in the variable — because the panel's states have the same names as the droplist's options.

  7. Click OK to close the Edit Value dialog, and then click OK to save the Set Panel State action.

5. Preview the Interaction

  1. Preview Page 1 and select a color in the dropdown.

  2. Click the Next Page button to navigate to Page 2. The dynamic panel should display the color you selected in the droplist.

← Scroll Activated Sticky HeaderSlider Control →
  • 1. Widget and Page Setup
    • Page 1 – The Selection Form
    • Page 2 – The Dynamic Panel
  • 2. Create a Global Variable to Store the User's Selection
  • 3. Capture the User's Input and Go to the Next Page
    • Set the Variable's Value to the Droplist's Selection
    • Open Link to Page 2
  • 4. Set the Dynamic Panel's State to the Variable's Value
  • 5. Preview the Interaction
Axure Docs
Stay Connected

Sign up to receive Axure tutorials and news. You can unsubscribe at any time.

Axure
TourEnterpriseCompanyDownloadPurchase
Legal
Customer AgreementPrivacy PolicyGDPRSecurityPatents
Resources
BlogForumLicense PortalAxure Cloud
Support
Learn and SupportGetting StartedReferenceWidget LibrariesAxure RP 8 Documentation and Tutorials
Copyright © 2002–2021 Axure Software Solutions, Inc. All rights reserved. Axure® is a registered trademark of Axure Software Solutions, Inc.