Search.../

suffix

Sets or gets the dashboard input suffix.

Description

You can set or get a suffix for a dashboard input element. For example, you can set a suffix to be a unit of measurement, such as 'cm'.

The following formats are supported:

  • A string literal, such as 'cm'
  • Vector images from the Media Manager: wix:vector://v1/<vector_uri>/<filename>
  • Vector images from the web: http(s)://<vector image url>
  • Vector XML strings: <svg>...</svg>

To disable the dashboard input suffix, set the suffix property to null.

Type:

stringRead & Write

Was this helpful?

Get the dashboard input suffix

Copy Code
1let prefix = $w('#myInput').suffix; // %
Set the dashboard input suffix to a string literal

Copy Code
1$w('#myInput').suffix = '%';
Set the dashboard input suffix to an vector image in the Media Manager

Copy Code
1$w('#myElement').suffix = 'wix:vector://v1/ce0334_2cec984ab68c490891dda1b53a33fead.svg/my-vector-graphic.svg';
Set the dashboard input suffix to a vector XML string

Copy Code
1$w('#myElement').suffix = '<svg height="10" width="10"><polygon points="0,9 9,9 5,0" style="fill:lime;stroke:purple;stroke-width:1"/></svg>';
Disable the dashboard input suffix

Copy Code
1$w('#myElement').suffix = null; // Disable the button's suffix property