File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Gravity Perks // Advanced Select // Enable "Add New" Option
3+ * https://gravitywiz.com/documentation/gravity-forms-advanced-select/
4+ *
5+ * Enable Advanced Select's "Add New" option that allows users to create new items that aren't in the initial list of options.
6+ *
7+ * Instructions:
8+ *
9+ * 1. Install this snippet with our free Custom JavaScript plugin.
10+ * https://gravitywiz.com/gravity-forms-custom-javascript/
11+ *
12+ * 2. Enable "Allow field to be populated dynamically" option under your Advanced-Select-enabled field's Advanced settings.
13+ * NOTE: This step is not required if you are dynamically populating choices via Populate Anything.
14+ */
15+ gform . addFilter ( 'gpadvs_settings' , function ( settings , gpadvs ) {
16+ if ( gpadvs . formId == GFFORMID ) {
17+ settings . create = true ;
18+ }
19+ return settings ;
20+ } ) ;
You can’t perform that action at this time.
0 commit comments