Skip to content

Instantly share code, notes, and snippets.

@morganisok
Forked from ryanurban/Editor-Class-Issue.php
Last active November 5, 2021 00:34
Show Gist options
  • Select an option

  • Save morganisok/439a2e1f77af0d94e873f38249b6cd5e to your computer and use it in GitHub Desktop.

Select an option

Save morganisok/439a2e1f77af0d94e873f38249b6cd5e to your computer and use it in GitHub Desktop.
<?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