Button Widget
The Button widget creates interactive clickable buttons that can trigger various actions within your interface. This widget provides extensive customization options for appearance, behavior, and functionality.
OverviewDirect link to Overview
The Button widget is a versatile UI component that allows users to trigger actions, submit forms, navigate between pages, or execute custom functions. It supports multiple visual styles, sizes, icons, and positioning options.

Basic ConfigurationDirect link to Basic Configuration
Global SettingsDirect link to Global Settings
NameDirect link to Name
- Field: Name
- Description: Display name for the button
- Type: Text input
- Usage: This text appears on the button and can be translated
Variable/ModelDirect link to Variable/Model
- Field: Variable/Model
- Description: The data model or variable name associated with this button
- Type: Text input
- Usage: Used for data binding and referencing the button in scripts
Button PropertiesDirect link to Button Properties
Button TypeDirect link to Button Type
- Field: Button Type
- Options:
primary- Primary action button (typically blue)success- Success/confirmation button (typically green)info- Informational button (typically grey)warning- Warning button (typically orange/yellow)danger- Destructive action button (typically red)
- Default:
primary - Colours: the colours above are those of the historical SoftyFlow look. When your account applies its design to the applications (Settings › Design & colours › Apply to the applications too), the buttons follow the design:
primarytakes the accent colour of the design, which is your primary brand colour if you set one;success,warning,dangerandinfotake the status and neutral colours of the design. Your client CSS is loaded last and always keeps the last word.
Size OptionsDirect link to Size Options
- Field: the Medium / Small / Mini buttons of the Global card (
size) - Options:
medium- Standard size buttonsmall- Smaller buttonmini- Minimal size button
- Default:
medium
AlignmentDirect link to Alignment
- Field: the Left / Center / Right buttons of the Global card (
float) - Options:
left- Align button to the leftcenter- Center the buttonright- Align button to the right
- Default:
left
Icon ConfigurationDirect link to Icon Configuration
Prefix IconDirect link to Prefix Icon
- Field: Prefix Icon
- Description: Icon displayed before the button text
- Type: Icon selector
- Usage: Choose from available icon library
Suffix IconDirect link to Suffix Icon
- Field: Suffixe Icon (as spelled in the builder)
- Description: Icon displayed after the button text
- Type: Icon selector
- Usage: Choose from available icon library

Actions ConfigurationDirect link to Actions Configuration
On Click ActionDirect link to On Click Action
The click of the button is set in the Actions card of the configuration panel:
- Create on click action: shown while the button has no action. It opens the Actions drawer on a new On Click chain.
- View attached action: shown once an action chain is attached. It opens the same drawer on the existing chain.

In the drawer, you build the chain from the action categories (Dom, Collection, Process, Api, SoftyTables, User, Basic) and save it with Save:

The chain can, for example:
- Script Execution: Execute custom JavaScript code
- Form Submission: Submit parent form data
- Navigation: Navigate to other pages or URLs
- API Calls: Make HTTP requests to external services
- Variable Updates: Modify interface variables
- Function Calls: Trigger predefined functions
- Open a task: open the page of a task from its ID, in the same tab or a new one, with the openTask action. On a Button widget, the Task Id comes from a variable of the page (for example
models.taskId), becauseSF_inputonly holdsSF_currentIndexhere; in a loop, read the row at that index (for examplemodels.tasks[SF_input.SF_currentIndex].taskId).SF_input._idis specific to the row buttons of the Table widget, whereSF_inputis the clicked row
Action PropertiesDirect link to Action Properties
- SF_input: The input of the chain. On a Button widget, it only holds
SF_currentIndex - SF_currentIndex: Current index in loop contexts
- Loading State: Automatic loading indicator during action execution
- Error Handling: Built-in error management: whatever happens in the chain, the button is given back at the end (see Loading States)
Validation and VisibilityDirect link to Validation and Visibility
Screen-Based ValidationDirect link to Screen-Based Validation
Configure button behavior across different screens/contexts:
AvailableDirect link to Available
- Description: Controls if the button exists in the interface
- Type: Boolean (a simple switch; it takes no condition)
- Default:
true
VisibleDirect link to Visible
- Description: Controls button visibility
- Type: Boolean or conditional expression
- Options:
- Simple toggle (true/false)
- Advanced conditional expression using variables
RequiredDirect link to Required
- Description: Validation requirement (if part of form)
- Type: Boolean or conditional expression
- Context: Only applicable when button is part of form validation
DisabledDirect link to Disabled
- Description: Controls if button is interactive
- Type: Boolean or conditional expression
- Effect: Button appears grayed out and non-clickable when disabled

Advanced Conditional LogicDirect link to Advanced Conditional Logic
Use conditional expressions with interface variables:
- With All Screens selected in the canvas, click Advanced Setting in the Validation card: the Visible, Required and Disable switches become pencil icons. Available stays a simple switch.
- Click the pencil of a screen and a property: the Advanced Setting Condition dialog opens.
- Write the condition, with the variables of the interface in
{{ }}(for example{{montant}} > 1000). - Click Apply for this screen only, or Apply to All screens.
Easy Setting brings the switches back, except for a property that holds a condition: it keeps its pencil. To give it its switch back, replace the condition with true or false, then click Easy Setting.
With one screen selected in the All Screens selector of the canvas, the card only shows that screen: one row each for Visible, Required and Disable, with a switch and a pencil side by side, and no Available column. You do not need Advanced Setting there (the link stays visible on the first screen, where it has no effect).

Styling and AppearanceDirect link to Styling and Appearance
CSS ClassesDirect link to CSS Classes
- Field: Class, in the Style card
- Description: Custom CSS classes for styling, added to the button
- Type: Text input (class names separated by spaces; commas are removed, so do not use them as separators)
- Usage: Apply custom styles or framework classes
Dynamic ClassesDirect link to Dynamic Classes
The brush button next to Class (Dynamic classes) opens an editor where you write a JSON object: each key is a class name, each value a condition with the variables of the interface in {{ }}. The class is added to the button while its condition is true, for example { "btn-urgent": {{montant}} > 1000 }.
Layout OptionsDirect link to Layout Options
The Style card of a button only holds Class and Dynamic classes: the size and the alignment are set in the Global card. The rest of the appearance comes from the portal design when it applies, from your client CSS, or from the style sheet of the page (Page settings › Appearance › Stylesheet (CSS)), which replaces the client CSS for this page.

Usage ExamplesDirect link to Usage Examples
Basic ButtonDirect link to Basic Button

Button with IconsDirect link to Button with Icons

Action Button with Start ProcessDirect link to Action Button with Start Process

Conditional ButtonDirect link to Conditional Button

EventsDirect link to Events
onClickDirect link to onClick
- Trigger: When button is clicked
- Context: Provides access to current data and form state
- Parameters:
SF_input: Input context object ({ SF_currentIndex }on a Button widget)SF_currentIndex: Current loop index (if applicable)
Loading StatesDirect link to Loading States
- Automatic Loading: Button shows loading spinner during async operations
- Disabled During Loading: Button becomes non-interactive during action execution
- Always Given Back: when the chain ends, the spinner is removed and the button is enabled again, even when an action of the chain fails
- No Action, No Effect: a button without any action attached does nothing when clicked (no spinner, no disabling)
Up to version 8.5, only a button without any action, or a button whose <id>_action method written by hand in the page code threw an error, stayed disabled with its spinner until the page was reloaded: the chains built in the Actions drawer already caught their errors. Since version 8.6, a button without actions ignores the click, and a button with actions is always given back at the end, whether its chain or its method succeeded or failed.
Best PracticesDirect link to Best Practices
Action DesignDirect link to Action Design
- Clear Labels: Use descriptive button text
- Appropriate Types: Match button type to action severity
- Loading Feedback: Ensure async actions show loading states
- Error Handling: Implement proper error management
Visual DesignDirect link to Visual Design
- Consistent Sizing: Use consistent sizes within form groups
- Logical Positioning: Place primary actions prominently
- Icon Usage: Use icons to enhance, not replace, clear text
- Color Coding: Follow standard color conventions
AccessibilityDirect link to Accessibility
- Keyboard Navigation: Ensure buttons are keyboard accessible
- Screen Reader Support: Use meaningful button names
- Focus Management: Proper focus handling in forms
- Contrast: Ensure sufficient color contrast
Form IntegrationDirect link to Form Integration
- Validation Context: Consider button role in form validation
- Submit Behavior: Configure appropriate form submission
- Field Dependencies: Set up proper field relationships
Advanced FeaturesDirect link to Advanced Features
Form IntegrationDirect link to Form Integration
- Submit Forms: Automatically submit parent forms
- Validation Triggers: Trigger form validation
- Field Dependencies: React to other form field changes
Loop ContextDirect link to Loop Context
- Loop Integration: Special handling within data loops
- Index Access: Access to current loop iteration
- Dynamic Properties: Properties that change per loop item
Custom StylingDirect link to Custom Styling
- Theme Integration: Integrates with interface theme settings and, when your account applies its design to the applications, with the design and your brand colours (see Button Type)
- Responsive Design: Adapts to different screen sizes
- Custom CSS: Support for custom styling
TroubleshootingDirect link to Troubleshooting
Common IssuesDirect link to Common Issues
- Button Not Responding: Check if disabled or validation conditions, and that an action chain is attached (Actions card: View attached action); a button without actions does nothing
- Actions Not Executing: Verify action configuration and permissions
- Styling Issues: Check CSS class conflicts
- Loading States: Ensure async actions are properly handled
DebuggingDirect link to Debugging
- Browser Console: Check for JavaScript errors
- Network Tab: Monitor API calls during button actions
- State Inspection: Verify variable states and conditions