Description
The Buttons are created in Build.One using the SwatButton object. A SwatButton can be used in Forms to trigger functions. To do this, the button is included in the form designer and connected to the corresponding function.
How to use it
- Open the form in which you want to insert the button in the Form Designer.
- Look for the SimpleSwatButton in the Library of Objects
- Drag and drop it onto your form.
- Set the Enabled attribute to true (This step makes the button clickable).
- Rename the button in the Label attribute.
- Create a function that you want to connect with your button.
- Save and compile your frontend code with CRTL + S
- Perform a hard reset of your browser and empty the cache.
- Got to the attributes of your button and fill in the the function you declared
- Select the corresponding event e.g. eventClick and declare it in the following way
Here you find an example for a simple frontend code How-To: Hello World! in TypeScript
This is necessary because there are currently two different compiled versions. After you have created and compiled the new frontend code, the code will be available in Gitpod. However, the browser window still has a version with old cached code. By refreshing, you will pull the latest code into your browser window and then be able to use your function.
#.functionName(eventSource);
Settings/Attributes
attribute | description | Example/Values |
ENABLED | enables the button to be clickable | true/false |
Label | Name of the button | String |
eventClick | Function that will be triggered by the button when clicking the button | #.functionName(eventSource); |
Back to Documentation
Back to Home Page