what is use of "addDecoration" in client script?when we are use?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 11:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2018 11:53 PM
Hey Sairam,
The GlideForm API provides methods to customize forms. GlideForm.js is the JavaScript class containing the methods. The global object g_form is used to access GlideForm methods. GlideForm methods are only used on the client.
These methods are used to make custom changes to the form view of records. All validation of examples was done using Client Scripts.
Some of these methods can also be used in other client scripts (such as Catalog Client Scripts or Wizard Client Scripts), but must first be tested to determine whether they will work as expected.
There is no constructor for the GlideForm class. Access GlideForm methods using the g_form global object.
GlideForm - addDecoration(String fieldName, String icon, String title)
Adds an icon on a field's label.
fieldName | String | The field name. |
icon | String | The font icon to show next to the field. Supported icons - icon-user, icon-user-group, icon-lightbulb, icon-home, icon-mobile, icon-comment, icon-mail, icon-locked, icon-database, icon-book, icon-drawer, icon-folder, icon-catalog, icon-tab, icon-cards, icon-tree-right, icon-tree, icon-book-open, icon-paperclip, icon-edit, icon-trash, icon-image, icon-search, icon-power, icon-cog, icon-star, icon-star-empty, icon-new-ticket, icon-dashboard, icon-cart-full, icon-view, icon-label, icon-filter, icon-calendar, icon-script, icon-add, icon-delete, icon-help, icon-info, icon-check-circle, icon-alert, icon-sort-ascending, icon-console, icon-list, icon-form, and icon-livefeed. |
title | String | The text title for the icon. |
void |
g_form.addDecoration('caller_id', 'icon-star', 'preferred member');
GlideForm - addDecoration(String fieldName, String icon, String title, String color)
Adds an icon on a field's label.
fieldName | String | The field name. |
icon | String | The font icon to show next to the field. Supported icons - icon-user, icon-user-group, icon-lightbulb, icon-home, icon-mobile, icon-comment, icon-mail, icon-locked, icon-database, icon-book, icon-drawer, icon-folder, icon-catalog, icon-tab, icon-cards, icon-tree-right, icon-tree, icon-book-open, icon-paperclip, icon-edit, icon-trash, icon-image, icon-search, icon-power, icon-cog, icon-star, icon-star-empty, icon-new-ticket, icon-dashboard, icon-cart-full, icon-view, icon-label, icon-filter, icon-calendar, icon-script, icon-add, icon-delete, icon-help, icon-info, icon-check-circle, icon-alert, icon-sort-ascending, icon-console, icon-list, icon-form, and icon-livefeed. |
title | String | The text title for the icon. |
color | String | A CSS color. |
void |
g_form.addDecoration('caller_id', 'icon-star', 'Mark as Favorite', 'color-green');
Please refer:
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2018 01:19 AM
Hi Rajesh,
How to validate unique name in client script?
In my form "Name" field is there its string ,
i would like to apply the unique name validation how i will write code in client onSubmit?
Ex:
Raju is existing member in our list
i would like to create one more record with same name at that time form throws the error message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2021 07:56 AM
Hello Rajesh,
Hover over help text for a field with the question mark inside a circle, and the question mark should be on the right side of a field, can you please help me with that.
Thanks in Advance