Skip to main content
Button

How to use and customize the button block in your projects to submit a form, set active view, or go to a link

Daniel avatar
Written by Daniel
Updated over a week ago

The button in Whirr allows you to submit a form, set active view, or go to a link. This is useful for creating interactive user experiences, seamless navigation between different parts of your project, and submitting responses.

How to add a button

You can add button block in Whirr in the same way you summon other blocks in your project. To start, hit / to begin a quick command. Then, type button.

The signature field block will appear in the quick command menu, simply select it.

💡 Did you know? You can quickly add a submit button to your project by typing /submit

How to customize the button block

Customizing this block is easy. Simply hover over the block's grab handle. Click to edit.

The button block is powerful, and allows you to customize it with various options

  • On click

    • Submit form

    • Go to hyperlink

    • Set active view

Let's dig a bit deeper into each of these options

How to submit a form with a button

To make a button submit a form, simply set the On Click action to Submit form.

When you do this, another option appears to set what view you'd like to display as the success screen. You can use this to set up a thank you/post-submit screen.

How to go to a link with a button

For a button to open a link, set the On Click action to Go to hyperlink.

When you do this, another couple options appears to set what URL you would like the button to direct to. In addition to the URL field, you also have the option to toggle to open your link in a new tab.

How to set an active view with a button

To set an active view with your button, set the On Click action to Set active view.

When you do this, a dropdown appears to set what view you would like the button to direct to. This lets you create multi-step forms.

Did this answer your question?