You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Current »

Use the <button> tag to add a button to your widget form. The behavior is similar to React's

By default, no event is connected to the button. Use event-click attribute to add an event when a user clicks the button.

Available attributes:

AttributeTypeMandatoryDescription
buttonTypeStringN

Specify button display style for forms and lists

  • unstyled – a white color button
  • primary – a blue color button
  • approve – a green color button
  • destructive – a red color button
  • secondary – a transparent background for the button

Use the following button types along with the svg attribute:

  • icon-mini – a small square button

  • icon – a square button

  • icon-primary – a square button with blue background
  • icon-border – a square button with borders
  • expand – a rectangular button with blue background, and specified svg is colored in blue as well
disabledBooleanN

Set the value to true to disable the button.  A disabled button becomes gray and users cannot click it. The default value is false.

isVisible

BooleanNSet the value to false to hide the button. The default value is true.
svgStringNSpecify the SVG code of a pre-decoded image file.
hintStringNAdd a text hint for the button.
classStringNSpecify the CSS class name that is defined in the CSS field of the widget.

Example:

Button
<checkbox model="data.userCanReject" event-change="window.s_widget_custom.canCheckboxHandler();"></checkbox>
  
<button buttonType="destructive" disabled={data.userCanReject} event-click="window.s_widget_custom.reject();">
  {data.rejectBtnTitle}
</button>


  • No labels