Skip to content

Commit cb53f85

Browse files
committed
gpadvs-dropdown-remove-button.js: Added snippet to show remove button on Dropdown fields.
1 parent 62668ca commit cb53f85

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Gravity Perks // Advanced Select // Dropdown Remove Button
3+
* https://gravitywiz.com/documentation/gravity-forms-advanced-select/
4+
*
5+
* Adds a Remove button to selection options in Dropdown fields. By default,
6+
* the remove button is only added to Multi-Select fields.
7+
*
8+
* Instructions:
9+
*
10+
* 1. Install this snippet with our free Custom JavaScript plugin.
11+
* https://gravitywiz.com/gravity-forms-code-chest/
12+
*/
13+
window.gform.addFilter(
14+
'gpadvs_settings',
15+
function(settings, gpadvsInstance, selectNamespace) {
16+
settings.plugins.remove_button = {
17+
title: window.GPADVS.strings?.remove_this_item
18+
? window.GPADVS.strings.remove_this_item
19+
: 'Remove this item',
20+
}
21+
22+
return settings;
23+
}
24+
);

0 commit comments

Comments
 (0)