Search...
suffix
Sets or gets the dashboard text button suffix.
Description
You can get or set a suffix for a dashboard text button. 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 string:
<svg>...</svg>
.
To disable a text button suffix, set the suffix
property to null
.
Type:
stringRead & Write
Was this helpful?
Get the dashboard text button suffix value
Copy Code
1let prefix = $w('#myInput').suffix; // %
Set the dashboard text button suffix value to a string literal
Copy Code
1$w('#myInput').suffix = '%';
Set the dashboard text button 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 text button 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 text button suffix
Copy Code
1$w('#myElement').suffix = null; // Disable the button's suffix property