-
-
Save morganisok/439a2e1f77af0d94e873f38249b6cd5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'gform_form_settings_fields', function( $fields ) { | |
| $test_group = [ | |
| [ | |
| 'title' => 'Example Fields', | |
| 'fields' => [ | |
| [ | |
| 'name' => 'input', | |
| 'label' => 'Input w/o merge tags', | |
| 'type' => 'text', | |
| ], | |
| [ | |
| 'name' => 'input_mt', | |
| 'label' => 'Input w/ merge tags', | |
| 'type' => 'text', | |
| 'class' => 'merge-tag-support mt-hide_all_fields', | |
| ], | |
| [ | |
| 'name' => 'textarea', | |
| 'label' => 'Standard Textarea w/o merge tags', | |
| 'type' => 'textarea', | |
| ], | |
| [ | |
| 'name' => 'textarea_mt', | |
| 'label' => 'Standard Textarea w/ merge tags', | |
| 'type' => 'textarea', | |
| 'class' => 'merge-tag-support mt-hide_all_fields ui-autocomplete-input', | |
| ], | |
| [ | |
| 'name' => 'textarea_rte', | |
| 'label' => 'Rich Text Editor Textarea w/ merge tags 1', | |
| 'type' => 'textarea', | |
| 'use_editor' => true, | |
| ], | |
| [ | |
| 'name' => 'textarea_rte_prop', | |
| 'label' => 'Rich Text Editor Textarea w/o merge tags', | |
| 'type' => 'textarea', | |
| 'use_editor' => true, | |
| 'class' => '', | |
| ], | |
| [ | |
| 'name' => 'textarea_rte_again', | |
| 'label' => 'Rich Text Editor Textarea w/ merge tags 2', | |
| 'type' => 'textarea', | |
| 'use_editor' => true, | |
| ], | |
| [ | |
| 'name' => 'textarea_rte_again_again', | |
| 'label' => 'Rich Text Editor Textarea w/ merge tags 3', | |
| 'type' => 'textarea', | |
| 'use_editor' => true, | |
| ], | |
| ], | |
| ], | |
| ]; | |
| return array_merge( $test_group, $fields ); | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment