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

Account Login Tutorial

In this tutorial, you'll learn how to make a login form that uses conditional logic to validate the user's credentials.

Note

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

1. Page and Widget Setup

initial page and widget setup

Page 1 – The Login Form

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

  2. Drag two text field widgets onto the canvas. Name one text field Email Field and the other Password Field. (You can optionally label each with a label widget.)

    Tip

    To mask the Password Field's text, set its input type to Password.

  3. Drag a button widget onto the canvas and set its text to Log In.

  4. Drag a Heading 3 widget onto the canvas. Set its text to Invalid email and/or password and name it Error Message.

  1. Change the error message's font color to red, and hide it by clicking the Hidden icon in the style toolbar or the Style pane.

Page 2 – The Successful Login Page

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

  2. Drag a Heading 1 widget onto the canvas and set its text to Thank you for logging in!

2. The Successful Login Case

Link to the Second Page

  1. Select the Login Button and click Click or Tap → Open Link in the Interactions pane. Select Page 2 in the dropdown that appears, and click OK.

    the Click or Tap → Open Link common interaction button

Add a Condition That Validates the Text Fields

  1. Hover over the Click or Tap heading and click Enable Cases to the right. In the Condition Builder dialog that appears, name the case Successful Login and click Add Logic.

    creating the successful login case

  2. In the condition row that appears, select the Email Field text field in the second dropdown and enter test@domain.com in the field to the right.

  3. Click Add Row to add another conditional statement. Select the Password Field text field in the second dropdown and enter 123456 in the field to the right.

    the successful login conditions

    The summary at the bottom of the dialog should read: If text on Email Field equals "test@domain.com" and text on Password Field equals "123456". This condition will be met only if both statements are true when the Login Button is clicked.

  4. Click OK to close the Condition Builder.

3. The Incorrect Login Case

  1. With the Login Button selected, hover over the Click or Tap heading and click Add Case to the right. In the Condition Builder dialog that appears, name the new case Incorrect Login and click OK without adding any logic.

    adding a second case with no conditional logic

  1. In the Interactions pane, click the Insert Action icon below the new case heading. Select Show/Hide in the list that appears, and target the Error Message widget. Leave Show selected and click OK.

    Note

    Notice that even though we didn't set up a condition for this case, it has the condition ELSE IF true. This case, also known as a "default" case, will fire if the first case's condition doesn't pass (if the wrong email and/or password is provided in the form).

showing the error message in the second case

4. Preview the Interaction

  1. Preview the page and click the Log In button. The error message should appear since you haven't yet provided the correct login information.

  2. Now enter test@domain.com in the Email field and 123456 in the Password field, and click the Log In button again. You should be taken to Page 2 of the prototype.

Additional Information and Tips

Hide the Error Message When the Text Fields Are Focused

If you would like the error message to be hidden again when the user clicks on one of the text fields, set up a Show/Hide action under the Got Focus event for each text field.

← Drag and DropAuto Tab Fields →
  • 1. Page and Widget Setup
    • Page 1 – The Login Form
    • Page 2 – The Successful Login Page
  • 2. The Successful Login Case
    • Link to the Second Page
    • Add a Condition That Validates the Text Fields
  • 3. The Incorrect Login Case
  • 4. Preview the Interaction
  • Additional Information and Tips
    • Hide the Error Message When the Text Fields Are Focused
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.