How to add user inputs to your solution
A how-to-guide for adding user inputs to your solution
Introduction
Add user inputs to your web-app.
Prerequisites
- You followed the get started with the workbench guides.
1. Add a ControlPanel block
To add user defined values to your web-app, configure a ControlPanel block.
- Open your solution.yaml file
- Add a
ControlPanelblock to the contents of the frame where you want the user inputs. - Configure
controlsto represent your inputs. Some control types are below.- TextInput
- Slider
- Toggle
- Dropdown
- For more control types see the ControlPanel controls
...
my-main-frame:
kind: Frame
contents:
my-controlpanel:
kind: ControlPanel
controls:
my-input-1:
kind: Slider
label: Number Slider Control
value: 20
min: 0
max: 100
precision: 3
unit: mm
2. Deploy
- Saving and deploy the solution
- Open the web-app
Configuration
See the ControlPanel block for more information.
Next steps
- Add titles and descriptions to your web-app
- Connect user inputs to automate a calculation
- Connect user inputs to [display geometry in a web viewer]