-
Notifications
You must be signed in to change notification settings - Fork 22
/
form_detail.php
3515 lines (3157 loc) · 178 KB
/
form_detail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
if ( ! class_exists( 'GFForms' ) ) {
die();
}
use Gravity_Forms\Gravity_Forms\Editor_Button\GF_Editor_Service_Provider;
use Gravity_Forms\Gravity_Forms\Save_Form\GF_Save_Form_Service_Provider;
use Gravity_Forms\Gravity_Forms\Save_Form\GF_Form_CRUD_Handler;
class GFFormDetail {
public static function forms_page( $form_id ) {
global $wpdb;
if ( ! GFCommon::ensure_wp_version() ) {
return;
}
self::update_recent_forms( $form_id );
/**
* @var Gravity_Forms\Gravity_Forms\Save_Form\GF_Save_Form_Helper $save_form_helper
*/
$save_form_helper = GFForms::get_service_container()->get( GF_Save_Form_Service_Provider::GF_SAVE_FROM_HELPER );
$update_result = '';
if ( rgpost( 'operation' ) == 'trash' ) {
check_admin_referer( 'gforms_trash_form', 'gforms_trash_form' );
GFFormsModel::trash_form( $form_id );
?>
<script type="text/javascript">
jQuery(document).ready(
function () {
document.location.href = '?page=gf_edit_forms';
}
);
</script>
<?php
exit;
} elseif ( ! rgempty( 'gform_meta' ) && $save_form_helper->is_ajax_save_action() === false ) {
check_admin_referer( "gforms_update_form_{$form_id}", 'gforms_update_form' );
$update_result = self::save_form_info( $form_id, rgpost( 'gform_meta', false ) );
?>
<script type="text/javascript">
var updateFormResult = <?php echo json_encode( $update_result ) ?>;
</script>
<?php
}
wp_print_styles( array( 'thickbox' ) );
/* @var GF_Field_Address $gf_address_field */
$gf_address_field = GF_Fields::get( 'address' );
$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min';
?>
<script type="text/javascript" data-js-reload="gforms-scripts-globals">
<?php GFCommon::gf_global(); ?>
<?php GFCommon::gf_vars(); ?>
</script>
<script type="text/javascript" data-js-reload="gforms-scripts-form-scripts" >
function has_entry(fieldNumber) {
var submitted_fields = [<?php echo RGFormsModel::get_submitted_fields( $form_id ); ?>];
for (var i = 0; i < submitted_fields.length; i++) {
if (submitted_fields[i] == fieldNumber)
return true;
}
return false;
}
function InsertPostImageVariable(element_id, callback) {
var variable = jQuery('#' + element_id + '_image_size_select').attr("variable");
var size = jQuery('#' + element_id + '_image_size_select').val();
if (size) {
variable = "{" + variable + ":" + size + "}";
InsertVariable(element_id, callback, variable);
jQuery('#' + element_id + '_image_size_select').hide();
jQuery('#' + element_id + '_image_size_select')[0].selectedIndex = 0;
}
}
function InsertPostContentVariable(element_id, callback) {
var variable = jQuery('#' + element_id + '_variable_select').val();
var regex = /{([^{]*?: *(\d+\.?\d*).*?)}/;
matches = regex.exec(variable);
if (!matches) {
InsertVariable(element_id, callback);
return;
}
variable = matches[1];
field_id = matches[2];
for (var i = 0; i < form["fields"].length; i++) {
if (form["fields"][i]["id"] == field_id) {
if (form["fields"][i]["type"] == "post_image") {
jQuery('#' + element_id + '_image_size_select').attr("variable", variable);
jQuery('#' + element_id + '_image_size_select').show();
return;
}
}
}
InsertVariable(element_id, callback);
}
</script>
<?php
$form = ! rgempty( 'meta', $update_result ) ? rgar( $update_result, 'meta' ) : GFFormsModel::get_form_meta( $form_id );
if ( ! isset( $form['fields'] ) || ! is_array( $form['fields'] ) ){
$form['fields'] = array();
}
if ( GFCommon::is_form_editor() ) {
self::maybe_add_submit_button( $form );
}
$form = gf_apply_filters( array( 'gform_admin_pre_render', $form_id ), $form );
/**
* Allow users to perform actions before the form editor is rendered.
*
* @since 2.9.0
*
* @param array $form The form object.
*/
do_action( 'gform_editor_pre_render', $form );
if ( isset( $form['id'] ) ) {
// Unset notifications and confirmations to reduce payload size.
unset( $form['notifications'] );
unset( $form['confirmations'] );
echo "<script type=\"text/javascript\" data-js-reload=\"gforms-scripts-form-object\">var form = " . json_encode( $form ) . ';</script>';
} else {
echo "<script data-js-reload=\"gforms-scripts-form-object\" type=\"text/javascript\">var form = new Form();</script>";
}
?>
<!-- Legacy Container allow old addons js to find legacy elements in a hidden container so they don't break other js code -->
<div id="legacy_field_settings_container" data-js-reload="gforms-legacy-elements-container">
<div id="field_settings">
<ul>
<li style="width:100px; padding:0px;">
<a href="#gform_tab_1"><?php esc_html_e( 'General', 'gravityforms' ); ?></a>
</li>
<li style="width:100px; padding:0px; ">
<a href="#gform_tab_3"><?php esc_html_e( 'Appearance', 'gravityforms' ); ?></a>
</li>
<li style="width:100px; padding:0px; ">
<a href="#gform_tab_2"><?php esc_html_e( 'Advanced', 'gravityforms' ); ?></a>
</li>
</ul>
<div id="gform_tab_1">
</div>
<div id="gform_tab_3">
</div>
<div id="gform_tab_2">
</div>
</div>
</div>
<!-- End legacy container -->
<h1 class="gform-visually-hidden"><?php esc_html_e( 'Edit Form', 'gravityforms' ); ?></h1>
<div class="wrap gforms_edit_form <?php echo GFCommon::get_browser_class() ?>" data-js="form-editor-wrapper">
<?php
$forms = RGFormsModel::get_forms( null, 'title' );
$id = rgempty( 'id', $_GET ) ? count( $forms ) > 0 ? $forms[0]->id : '0' : rgget( 'id' );
$browser_icons = array( 'ie', 'opera', 'chrome', 'firefox', 'safari', 'edge' );
?>
<div id="gform-form-toolbar" class="gform-form-toolbar">
<div class="gform-form-toolbar__logo">
<a href="?page=gf_edit_forms">
<span class="screen-reader-text"><?php esc_html_e( 'Return to form list', 'gravityforms' ); ?></span>
<svg width="30" height="31" role="presentation" focusable="false" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M29 21.055c0 1.418-.998 3.156-2.22 3.861l-9.564 5.555c-1.222.705-3.217.705-4.44 0l-9.564-5.555C1.998 24.211 1 22.473 1 21.056V9.944c0-1.418.998-3.156 2.22-3.861L12.776.529c1.222-.705 3.217-.705 4.439 0l9.564 5.555c1.222.705 2.22 2.443 2.22 3.86v11.111z" fill="#fff"/><path class="g" d="M12.279 12.511H25V9H12.315c-1.814 0-3.324.612-4.47 1.816C5.073 13.707 5 21 5 21h19.913v-6.595h-3.578v3.084H8.81c.08-1.147.617-3.205 1.633-4.266.464-.484 1.052-.712 1.836-.712z" fill="#242748"/></svg>
</a>
</div>
<div class="gform-form-toolbar__form-title gform-form-toolbar__form-title--form-editor" data-js-reload="gforms-form-switcher">
<?php GFForms::form_switcher( $form['title'] ); ?>
</div>
<ul id="gform-form-toolbar__menu" class="gform-form-toolbar__menu">
<?php
$menu_items = apply_filters( 'gform_toolbar_menu', GFForms::get_toolbar_menu_items( $id ), $id );
foreach ( $menu_items as $key => $item ) {
if ( in_array( $key, array( 'edit', 'settings', 'entries' ) ) ) {
$fixed_menu_items[ $key ] = $item;
} else {
$dynamic_menu_items[ $key ] = $item;
}
}
echo GFForms::format_toolbar_menu_items( $fixed_menu_items );
if ( ! empty( $dynamic_menu_items ) ) {
echo '<span class="gform-form-toolbar__divider"></span>';
echo GFForms::format_toolbar_menu_items( $dynamic_menu_items );
}
?>
</ul>
<div id="gf_toolbar_buttons_container" class="gf_toolbar_buttons_container">
<?php
/**
* Allow users to perform actions before toolbar buttons are displayed.
*
* @since 2.6
*/
do_action( 'gform_before_toolbar_buttons' );
?>
<?php
$preview_args = array(
'form_id' => $form_id,
);
echo GFCommon::get_preview_link( $preview_args );
$ajax_save_disabled = $save_form_helper->is_ajax_save_disabled( $form_id );
if ( $ajax_save_disabled ) {
$save_button = '<button aria-disabled="false" aria-expanded="false" class="update-form gform-button gform-button--primary-new gform-button--icon-leading " onclick="SaveForm();" onkeypress="SaveForm();"> <i class="gform-button__icon gform-icon gform-icon--floppy-disk"></i>' . esc_html__( 'Save Form', 'gravityforms' ) . '</button>';
} else {
$save_button = '<button
id="ajax-save-form-menu-bar"
data-js="ajax-save-form"
aria-disabled="false"
aria-expanded="false"
class="update-form update-form-ajax gform-button gform-button--primary-new gform-button--interactive gform-button--active-type-loader gform-button--icon-leading"
>
<i class="gform-button__icon gform-button__icon--inactive gform-icon gform-icon--floppy-disk" data-js="button-icon"></i>
<span class="gform-button__text gform-button__text--inactive" data-js="button-inactive-text">
' . esc_html__( 'Save Form', 'gravityforms' ) . '
</span>
<span class="gform-button__text gform-button__text--active" data-js="button-active-text">
' . esc_html__( 'Saving', 'gravityforms' ) . '
</span>
</button>';
}
/**
* A filter to allow you to modify the Form Save button.
*
* @since unknown
*
* @param string $save_button The Form Save button HTML.
*/
$save_button = apply_filters( 'gform_save_form_button', $save_button );
echo $save_button;
?>
<?php
/**
* Allow users to perform actions after toolbar buttons are displayed.
*
* @since 2.8
*/
do_action( 'gform_after_toolbar_buttons' );
?>
<span id="please_wait_container" style="display:none;"><i class='gficon-gravityforms-spinner-icon gficon-spin'></i></span>
</div>
</div>
<form method="post" id="form_trash">
<?php wp_nonce_field( 'gforms_trash_form', 'gforms_trash_form' ); ?>
<input type="hidden" value="trash" name="operation" />
</form>
<?php
$no_conflict_mode = get_option( 'gform_enable_noconflict' );
$no_conflict_class = $no_conflict_mode ? ' form_editor_no_conflict' : '';
$no_fields_class = empty( $form['fields'] ) ? ' form_editor_fields_no_fields' : '';
$compact_view_class = GF_Editor_Service_Provider::is_compact_view_enabled( get_current_user_id(), $form_id ) ? ' gform-compact-view' : '';
$compact_view_class .= GF_Editor_Service_Provider::is_field_id_enabled( get_current_user_id(), $form_id ) ? ' gform-compact-view--show-id' : '';
$form_editor_class = sprintf( 'form_editor_fields_container%s%s%s', $no_fields_class, $no_conflict_class, $compact_view_class );
?>
<div
id="form_editor_fields_container"
class="<?php esc_attr_e( $form_editor_class ); ?>"
data-js="form-editor"
<?php echo ! empty( $form['fields'] ) ? 'data-simplebar' : ''; ?>
<?php echo ! empty( $form['fields'] ) && is_rtl() ? 'data-simplebar-direction="rtl"' : ''; ?>
>
<h2 class="gform-visually-hidden"><?php esc_html_e( 'The Form', 'gravityforms' ); ?></h2>
<?php
$has_pages = GFCommon::has_pages( $form );
$wrapper_el = GFCommon::is_legacy_markup_enabled( $form ) ? 'ul' : 'div';
$form_wrapper_legacy_class = GFCommon::is_legacy_markup_enabled_og( $form ) ? ' gform_legacy_markup' : '';
$form_wrapper_compact_view_class = GF_Editor_Service_Provider::is_compact_view_enabled( get_current_user_id(), $form_id ) ? ' gform-editor--compact' : '';
$form_wrapper_compact_view_id_class = GF_Editor_Service_Provider::is_field_id_enabled( get_current_user_id(), $form_id ) ? ' gform-editor--compact-show-id' : '';
?>
<?php GFFormDetail::editor_notices( $form ); ?>
<div class="gform_editor gform_wrapper gform-theme gform-theme--foundation gform-theme--framework gform-theme--orbital<?php echo $form_wrapper_compact_view_class . $form_wrapper_compact_view_id_class . $form_wrapper_legacy_class; ?>">
<div id="gform_pagination" data-title="<?php esc_attr_e('Pagination Options', 'gravityforms');?>" data-description="<?php esc_attr_e('Manage pagination options', 'gravityforms');?>" class="selectable gform-theme__disable" style="display:<?php echo $has_pages ? 'block' : 'none' ?>;">
<div class="gf-pagebreak-first gf-pagebreak"><?php esc_html_e( 'Start Paging', 'gravityforms' ) ?></div>
</div>
<<?php echo $wrapper_el; ?> id="gform_fields" class="<?php echo GFCommon::get_ul_classes( $form ) ?>">
<?php
if ( is_array( rgar( $form, 'fields' ) ) ) {
require_once( GFCommon::get_base_path() . '/form_display.php' );
foreach ( $form['fields'] as $field ) {
echo GFFormDisplay::get_field( $field, '', true, $form );
echo GFFormDisplay::get_row_spacer( $field, $form );
}
}
?>
</<?php echo $wrapper_el; ?>>
<div id="no-fields-drop" class="dropzone__target gform-theme__disable" style="<?php echo empty( $form['fields'] ) ? '' : 'display:none;'; ?>"></div>
<div id="no-fields" class="dropzone__placeholder gform-theme__disable" style="<?php echo empty( $form['fields'] ) ? '' : 'display:none;'; ?>">
<img class="gform-editor__no-fields-graphic" src="<?php echo GFCommon::get_base_url() . '/images/no-fields.svg'; ?>" alt="" />
<p><?php esc_html_e( 'Simply drag and drop the fields or elements you want in this form.', 'gravityforms' ); ?></p>
</div>
<div id="gform_last_page_settings" data-title="<?php esc_attr_e('Last page options', 'gravityforms');?>" data-description="<?php esc_attr_e('Manage last page options', 'gravityforms');?>" class="selectable gform-theme__disable" style="display:<?php echo $has_pages ? 'block' : 'none' ?>;">
<div class="gf-pagebreak-end gf-pagebreak"><?php esc_html_e( 'End Paging', 'gravityforms' ) ?></div>
</div>
</div>
<div>
<div id="after_insert_dialog" style="display:none;">
<h3><?php esc_html_e( 'You have successfully saved your form!', 'gravityforms' ); ?></h3>
<p><?php esc_html_e( 'What would you like to do next?', 'gravityforms' ); ?></p>
<div class="new-form-option">
<a id="preview_form_link" href="<?php echo esc_url_raw( trailingslashit( site_url() ) ); ?>?gf_page=preview&id={formid}" target="_blank"><?php esc_html_e( 'Preview this Form', 'gravityforms' ); ?></a>
</div>
<?php if ( GFCommon::current_user_can_any( 'gravityforms_edit_forms' ) ) { ?>
<div class="new-form-option">
<a id="notification_form_link" href="#"><?php esc_html_e( 'Setup Email Notifications for this Form', 'gravityforms' ); ?></a>
</div>
<?php } ?>
<div class="new-form-option">
<a id="edit_form_link" href="#"><?php esc_html_e( 'Continue Editing this Form', 'gravityforms' ); ?></a>
</div>
<div class="new-form-option">
<a href="?page=gf_edit_forms"><?php esc_html_e( 'Return to Form List', 'gravityforms' ); ?></a>
</div>
</div>
</div>
</div>
<div class="editor-sidebar">
<?php
/**
* Filters custom sidebar panels.
*
* @since 2.5
*
* @param array $setting_panels Custom panels array.
* @param array $from The current form object.
*/
$setting_panels = gf_apply_filters( array( 'gform_editor_sidebar_panels', $form_id ), array(), $form );
?>
<aside class="sidebar ui-tabs" role="region" >
<h2 class="gform-visually-hidden"><?php esc_html_e( 'Form Options and Settings', 'gravityforms' ); ?></h2>
<div class="sidebar__nav-wrapper">
<div class="search-button">
<label for="form_editor_search_input" class="gform-visually-hidden"><?php echo esc_attr__( 'Search a form field by name', 'gravityforms' ); ?></label>
<input id="form_editor_search_input" type="text" class="search-button__input" placeholder="<?php echo esc_attr__( 'Search for a field', 'gravityforms' ); ?>">
<span class="clear-button"></span>
</div>
<ul class="sidebar__nav ui-tabs-nav">
<li class="sidebar__nav__item ui-state-default ui-state-active ui-corner-top"><a href="#add_fields"><span class="sidebar__nav__item-text"><span class="sidebar__nav__item-text-inner"><?php esc_html_e( 'Add Fields', 'gravityforms' ); ?></span></span></a></li>
<li class="sidebar__nav__item ui-state-default ui-corner-top" id="settings_tab_item"><a href="#field_settings_container"><span class="sidebar__nav__item-text"><span class="sidebar__nav__item-text-inner"><?php esc_html_e( 'Field Settings', 'gravityforms' ); ?></span></span></a></li>
<?php
foreach ( $setting_panels as $panel ) {
if ( empty( $panel['id'] ) )
continue;
$panel_title = empty( $panel['title'] ) ? esc_html__( 'Custom settings', 'gravityforms' ) : $panel['title'];
$panel_nav_classes = ! empty( $panel['nav_classes'] ) ? $panel['nav_classes'] : array();
?>
<li class="sidebar__nav__item <?php echo is_array( $panel_nav_classes ) ? implode(' ', $panel_nav_classes) : $panel_nav_classes; ?>" ><a href="#<?php echo $panel['id']; ?>"><span class="sidebar__nav__item-text"><span class="sidebar__nav__item-text-inner"><?php echo $panel_title; ?></span></span></a></li>
<?php
}
?>
</ul>
</div>
<div class="sidebar__panel" id="add_fields">
<div id="floatMenu" style="display: none !important;"></div>
<!-- begin add button boxes -->
<div class="sidebar-instructions">
<p><?php esc_html_e( 'Drag a field to the left to start building your form and then start configuring it.', 'gravityforms' ); ?></p>
</div>
<div class="panel-block panel-block-tabs "id="add_fields_menu" data-simplebar<?php echo is_rtl() ? ' data-simplebar-direction="rtl"' : ''; ?>>
<?php
$field_groups = self::get_field_groups();
foreach ( $field_groups as $group ) {
$tooltip_class = empty( $group['tooltip_class'] ) ? 'tooltip_left' : $group['tooltip_class'];
?>
<div class="panel-block-tabs__wrapper">
<button tabindex="0" class="panel-block-tabs__toggle" >
<?php echo esc_html( $group['label'] ); ?>
</button>
<div class="panel-block-tabs__body panel-block-tabs__body--nopadding gf-field-group" id="add_<?php echo esc_attr( $group['name'] ); ?>">
<h3 class="gform-visually-hidden"><?php echo esc_html( $group['label'] ); ?></h3>
<div class="gf-field-group__no-results" style="display: none;">
<span><?php esc_html_e( 'No Matching Fields', 'gravityforms' ); ?></span>
</div>
<ul class="add-buttons" >
<?php self::display_buttons( $group['fields'] ); ?>
</ul>
</div>
</div>
<?php
}
?>
</div>
<!--end add button boxes -->
<!-- this field allows us to force onblur events for field setting inputs that are otherwise not triggered
when closing the field settings UI -->
<input type="text" id="gform_force_focus" style="position:absolute;left:-9999em;" data-js="force-focus" />
<form method="post" id="gform_update">
<?php wp_nonce_field( "gforms_update_form_{$form_id}", 'gforms_update_form' ); ?>
<input type="hidden" id="gform_meta" name="gform_meta" />
<input type="hidden" id="gform_export" name="gform_export" value="false"/>
</form>
</div>
<div class="sidebar__panel sidebar__panel--settings" id="field_settings_container" data-active-field-class="">
<div class="panel-block" id="nothing_selected"><?php echo esc_html__( 'No field selected' ,'gravityforms' ); ?></div>
<div class="panel-block panel-block--hidden" id="sidebar_field_info">
<div id="sidebar_field_icon"></div>
<div id="sidebar_field_description">
<div id="sidebar_field_label"></div>
<p id="sidebar_field_text"></p>
</div>
</div>
<!-- Sidebar field message -->
<div class="panel-block panel-block--hidden" id="sidebar_field_message_container">
<div class="gform-alert gform-alert--theme-cosmos">
<span class="gform-icon gform-icon--preset-active gform-alert__icon" aria-hidden="true"></span>
<div class="gform-alert__message-wrap">
<div class="gform-alert__message"></div>
</div>
</div>
</div>
<!-- End sidebar field message -->
<div class="panel-block panel-block-tabs panel-block--hidden field_settings" data-js="gform-simplebar" <?php echo is_rtl() ? ' data-simplebar-direction="rtl"' : ''; ?> data-simplebar-delay="1000">
<button tabindex="0" id="general_tab_toggle" class="panel-block-tabs__toggle">
<?php esc_html_e( 'General', 'gravityforms' ); ?>
</button>
<ul id="general_tab" class="panel-block-tabs__body panel-block-tabs__body--settings" data-js="form-editor-general-settings">
<li class="pagination_setting">
<fieldset>
<legend class="section_label">
<?php esc_html_e( 'Progress Indicator', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_progress_indicator' ); ?>
</legend>
<div id="pagination_type_container" class="pagination_container">
<input type="radio" id="pagination_type_percentage" name="pagination_type" value="percentage" onclick='InitPaginationOptions();' onkeypress='InitPaginationOptions();' />
<label for="pagination_type_percentage" class="inline"><?php esc_html_e( 'Progress Bar', 'gravityforms' ); ?></label>
<input type="radio" id="pagination_type_steps" name="pagination_type" value="steps" onclick='InitPaginationOptions();' onkeypress='InitPaginationOptions();' />
<label for="pagination_type_steps" class="inline"><?php esc_html_e( 'Steps', 'gravityforms' ); ?></label>
<input type="radio" id="pagination_type_none" name="pagination_type" value="none" onclick='InitPaginationOptions();' onkeypress='InitPaginationOptions();' />
<label for="pagination_type_none" class="inline"><?php esc_html_e( 'None', 'gravityforms' ); ?></label>
</div>
</fieldset>
</li>
<li class="pagination_setting" id="percentage_style_setting">
<div class="percentage_style_setting" style="z-index: 99;">
<label for="percentage_style" style="display:block;" class="section_label">
<?php esc_html_e( 'Progress Bar Style', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_percentage_style' ); ?>
</label>
<select id="percentage_style" onchange="TogglePercentageStyle();">
<option value="blue"> <?php esc_html_e( 'Blue', 'gravityforms' ); ?> </option>
<option value="gray"> <?php esc_html_e( 'Gray', 'gravityforms' ); ?> </option>
<option value="green"> <?php esc_html_e( 'Green', 'gravityforms' ); ?> </option>
<option value="orange"> <?php esc_html_e( 'Orange', 'gravityforms' ); ?> </option>
<option value="red"> <?php esc_html_e( 'Red', 'gravityforms' ); ?> </option>
<option value="spring"> <?php esc_html_e( 'Gradient: Spring', 'gravityforms' ); ?> </option>
<option value="blues"> <?php esc_html_e( 'Gradient: Blues', 'gravityforms' ); ?> </option>
<option value="rainbow"> <?php esc_html_e( 'Gradient: Rainbow', 'gravityforms' ); ?> </option>
<option value="custom"> <?php esc_html_e( 'Custom', 'gravityforms' ); ?> </option>
</select>
</div>
<div class="percentage_custom_container">
<label for="percentage_background_color" style="display:block;">
<?php esc_html_e( 'Text Color', 'gravityforms' ); ?>
</label>
<?php self::color_picker( 'percentage_style_custom_color', '' ); ?>
</div>
<div class="percentage_custom_container">
<label for="percentage_background_bgcolor" style="display:block;">
<?php esc_html_e( 'Background Color', 'gravityforms' ); ?>
</label>
<?php self::color_picker( 'percentage_style_custom_bgcolor', '' ); ?>
</div>
</li>
<li class="pagination_setting" id="page_names_setting">
<label for="page_names_container" class="section_label">
<?php esc_html_e( 'Page Names', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_page_names' ); ?>
</label>
<div id="page_names_container" style="margin-top:5px;">
<!-- Populated dynamically from js.php -->
</div>
</li>
<li class="pagination_setting" id="percentage_confirmation_display_setting">
<div class="percentage_confirmation_display_setting">
<input type="checkbox" id="percentage_confirmation_display" onclick="TogglePercentageConfirmationText()" onkeypress="TogglePercentageConfirmationText()">
<label for="percentage_confirmation_display" class="inline">
<?php esc_html_e( 'Display completed progress bar on confirmation', 'gravityforms' ); ?>
</label>
</div>
</li>
<li class="pagination_setting" id="percentage_confirmation_page_name_setting">
<div class="percentage_confirmation_page_name_setting">
<label for="percentage_confirmation_page_name" style="display:block;" class="section_label">
<?php esc_html_e( 'Completion Text', 'gravityforms' ); ?>
</label>
<input type="text" id="percentage_confirmation_page_name" autocomplete="off"/>
</div>
</li>
<li class="last_pagination_setting">
<fieldset>
<legend class="section_label">
<?php esc_html_e( 'Previous Button', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_last_page_button' ); ?>
</legend>
<div class="last_page_button_options" id="last_page_button_container">
<input type="radio" id="last_page_button_text" name="last_page_button" value="text" onclick="TogglePageButton('last_page');" onkeypress="TogglePageButton('last_page');"/>
<label for="last_page_button_text" class="inline"><?php esc_html_e( 'Default', 'gravityforms' ); ?><?php gform_tooltip( 'previous_button_text' ); ?></label>
<input type="radio" id="last_page_button_image" name="last_page_button" value="image" onclick="TogglePageButton('last_page');" onkeypress="TogglePageButton('last_page');"/>
<label for="last_page_button_image" class="inline"><?php esc_html_e( 'Image', 'gravityforms' ); ?><?php gform_tooltip( 'previous_button_image' ); ?></label>
</div>
</fieldset>
<div id="last_page_button_text_container">
<label for="last_page_button_text_input" class="section_label">
<?php esc_html_e( 'Button Text:', 'gravityforms' ); ?>
</label>
<input type="text" id="last_page_button_text_input" class="input_size_b" autocomplete="off"/>
</div>
<div id="last_page_button_image_container">
<label for="last_page_button_image_url" class="section_label">
<?php esc_html_e( 'Image Path:', 'gravityforms' ); ?>
</label>
<input type="text" id="last_page_button_image_url" autocomplete="off"/>
</div>
</li>
<?php
/**
* Inserts additional content within the General field settings
*
* Note: This action fires multiple times. Use the first parameter to determine positioning on the list.
*
* @param int 0 The placement of the action being fired
* @param int $form_id The current form ID
*/
do_action( 'gform_field_standard_settings', 0, $form_id );
?>
<li class="label_setting field_setting">
<label for="field_label" class="section_label">
<?php esc_html_e( 'Field Label', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_label' ); ?>
<?php gform_tooltip( 'form_field_label_html' ); ?>
</label>
<input type="text" id="field_label" autocomplete="off"/>
</li>
<li class="submit_type_setting field_setting">
<fieldset>
<legend class="section_label">
<?php esc_html_e( 'Submit Input Type', 'gravityforms' ); ?>
</legend>
<div>
<input type="radio" name="submit_type" id="submit_type_text" value="text" onclick="return ToggleSubmitType( false );" onkeypress="return ToggleSubmitType( false );"/>
<label for="submit_type_text" class="inline"><?php esc_html_e( 'Text', 'gravityforms' ); ?></label>
<input type="radio" name="submit_type" id="submit_type_image" value="image" onclick="return ToggleSubmitType( false );" onkeypress="return ToggleSubmitType( false );"/>
<label for="submit_type_image" class="inline"><?php esc_html_e( 'Image', 'gravityforms' ); ?></label>
</div>
</fieldset>
</li>
<li class="submit_text_setting field_setting">
<label for="submit_text" class="section_label">
<?php esc_html_e( 'Submit Button Text', 'gravityforms' ); ?>
</label>
<input type="text" id="submit_text" autocomplete="off"/>
</li>
<li class="submit_image_setting field_setting">
<label for="submit_image" class="section_label">
<?php esc_html_e( 'Submit Button Image URL', 'gravityforms' ); ?>
</label>
<input type="text" id="submit_image" autocomplete="off"/>
</li>
<?php
do_action( 'gform_field_standard_settings', 5, $form_id );
?>
<li class="checkbox_label_setting field_setting">
<label for="field_checkbox_label" class="section_label">
<?php esc_html_e( 'Checkbox Label', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_checkbox_label' ); ?>
</label>
<input type="text" id="field_checkbox_label" autocomplete="off"/>
</li>
<?php
do_action( 'gform_field_standard_settings', 10, $form_id );
?>
<li class="description_setting field_setting">
<label for="field_description" class="section_label">
<?php esc_html_e( 'Description', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_description' ); ?>
</label>
<textarea id="field_description" fieldheight-2"></textarea>
</li>
<?php
do_action( 'gform_field_standard_settings', 20, $form_id );
?>
<li class="product_field_setting field_setting">
<label for="product_field" class="section_label">
<?php esc_html_e( 'Product Field Mapping', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_product' ); ?>
</label>
<select id="product_field" onchange="SetFieldProperty('productField', jQuery(this).val());">
<!-- will be populated when field is selected (js.php) -->
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 25, $form_id );
?>
<li class="product_field_type_setting field_setting">
<label for="product_field_type" class="section_label">
<?php esc_html_e( 'Field Type', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_type' ); ?>
</label>
<select id="product_field_type" onchange="if(jQuery(this).val() == ''){return;
} StartChangeProductType(jQuery('#product_field_type').val());">
<option value="singleproduct"><?php esc_html_e( 'Single Product', 'gravityforms' ); ?></option>
<option value="select"><?php esc_html_e( 'Drop Down', 'gravityforms' ); ?></option>
<option value="radio"><?php esc_html_e( 'Radio Buttons', 'gravityforms' ); ?></option>
<option value="price"><?php esc_html_e( 'User Defined Price', 'gravityforms' ); ?></option>
<option value="hiddenproduct"><?php esc_html_e( 'Hidden', 'gravityforms' ); ?></option>
<option value="calculation"><?php esc_html_e( 'Calculation', 'gravityforms' ); ?></option>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 37, $form_id );
?>
<li class="shipping_field_type_setting field_setting">
<label for="shipping_field_type" class="section_label">
<?php esc_html_e( 'Field Type', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_type' ); ?>
</label>
<select id="shipping_field_type" onchange="if(jQuery(this).val() == ''){return;
} StartChangeShippingType(jQuery('#shipping_field_type').val());">
<option value="singleshipping"><?php esc_html_e( 'Single Method', 'gravityforms' ); ?></option>
<option value="select"><?php esc_html_e( 'Drop Down', 'gravityforms' ); ?></option>
<option value="radio"><?php esc_html_e( 'Radio Buttons', 'gravityforms' ); ?></option>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 50, $form_id );
?>
<li class="base_price_setting field_setting">
<label for="field_base_price" class="section_label">
<?php esc_html_e( 'Price', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_base_price' ); ?>
</label>
<input type="text" id="field_base_price" onchange="SetBasePrice(this.value)" autocomplete="off"/>
</li>
<?php
do_action( 'gform_field_standard_settings', 75, $form_id );
?>
<li class="disable_quantity_setting field_setting">
<input type="checkbox" name="field_disable_quantity" id="field_disable_quantity" onclick="SetDisableQuantity(jQuery(this).is(':checked'));" onkeypress="SetDisableQuantity(jQuery(this).is(':checked'));"/>
<label for="field_disable_quantity" class="inline">
<?php esc_html_e( 'Disable quantity field', 'gravityforms' ); ?>
</label>
</li>
<?php
do_action( 'gform_field_standard_settings', 100, $form_id );
?>
<li class="option_field_type_setting field_setting">
<label for="option_field_type" class="section_label">
<?php esc_html_e( 'Field Type', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_type' ); ?>
</label>
<select id="option_field_type" onchange="if(jQuery(this).val() == ''){return;
}StartChangeInputType(jQuery('#option_field_type').val());">
<option value="select"><?php esc_html_e( 'Drop Down', 'gravityforms' ); ?></option>
<option value="checkbox"><?php esc_html_e( 'Checkboxes', 'gravityforms' ); ?></option>
<option value="radio"><?php esc_html_e( 'Radio Buttons', 'gravityforms' ); ?></option>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 125, $form_id );
?>
<li class="donation_field_type_setting field_setting">
<label for="donation_field_type" class="section_label">
<?php esc_html_e( 'Field Type', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_type' ); ?>
</label>
<select id="donation_field_type" onchange="if(jQuery(this).val() == ''){return;
}StartChangeDonationType(jQuery('#donation_field_type').val());">
<option value="select"><?php esc_html_e( 'Drop Down', 'gravityforms' ); ?></option>
<option value="donation"><?php esc_html_e( 'User Defined Price', 'gravityforms' ); ?></option>
<option value="radio"><?php esc_html_e( 'Radio Buttons', 'gravityforms' ); ?></option>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 150, $form_id );
?>
<li class="quantity_field_type_setting field_setting">
<label for="quantity_field_type" class="section_label">
<?php esc_html_e( 'Field Type', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_type' ); ?>
</label>
<select id="quantity_field_type" onchange="if(jQuery(this).val() == ''){return;
} StartChangeInputType(jQuery('#quantity_field_type').val());">
<option value="number"><?php esc_html_e( 'Number', 'gravityforms' ); ?></option>
<option value="select"><?php esc_html_e( 'Drop Down', 'gravityforms' ); ?></option>
<option value="hidden"><?php esc_html_e( 'Hidden', 'gravityforms' ); ?></option>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 200, $form_id );
?>
<li class="content_setting field_setting">
<label for="field_content" class="section_label">
<?php esc_html_e( 'Content', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_content' ); ?>
</label>
<textarea id="field_content" class="fieldheight-1 merge-tag-support mt-position-right mt-prepopulate"></textarea>
</li>
<?php
do_action( 'gform_field_standard_settings', 225, $form_id );
?>
<li class="next_button_setting field_setting">
<fieldset>
<legend><?php esc_html_e( 'Next Button', 'gravityforms' ); ?></legend>
<div class="next_button_options" id="next_button_container">
<input type="radio" id="next_button_text" name="next_button" value="text" onclick="TogglePageButton('next'); SetPageButton('next');" onkeypress="TogglePageButton('next'); SetPageButton('next');"/>
<label for="next_button_text" class="inline"><?php esc_html_e( 'Default', 'gravityforms' ); ?><?php gform_tooltip( 'next_button_text' ); ?></label>
<input type="radio" id="next_button_image" name="next_button" value="image" onclick="TogglePageButton('next'); SetPageButton('next');" onkeypress="TogglePageButton('next'); SetPageButton('next');"/>
<label for="next_button_image" class="inline"><?php esc_html_e( 'Image', 'gravityforms' ); ?><?php gform_tooltip( 'next_button_image' ); ?></label>
</div>
</fieldset>
<div id="next_button_text_container" style="margin-top:5px;">
<label for="next_button_text_input" class="inline">
<?php esc_html_e( 'Text:', 'gravityforms' ); ?>
</label>
<input type="text" id="next_button_text_input" class="input_size_b" autocomplete="off"/>
</div>
<div id="next_button_image_container" style="margin-top:5px;">
<label for="next_button_image_url" class="inline">
<?php esc_html_e( 'Image Path:', 'gravityforms' ); ?>
</label>
<input type="text" id="next_button_image_url" autocomplete="off"/>
</div>
</li>
<?php
do_action( 'gform_field_standard_settings', 237, $form_id );
?>
<li class="previous_button_setting field_setting">
<fieldset>
<legend>
<?php esc_html_e( 'Previous Button', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_previous_button' ); ?>
</legend>
<div class="previous_button_options" id="previous_button_container">
<input type="radio" id="previous_button_text" name="previous_button" value="text" onclick="TogglePageButton('previous'); SetPageButton('previous');" onkeypress="TogglePageButton('previous'); SetPageButton('previous');"/>
<label for="previous_button_text" class="inline"><?php esc_html_e( 'Default', 'gravityforms' ); ?><?php gform_tooltip( 'previous_button_text' ); ?></label>
<input type="radio" id="previous_button_image" name="previous_button" value="image" onclick="TogglePageButton('previous'); SetPageButton('previous');" onkeypress="TogglePageButton('previous'); SetPageButton('previous');"/>
<label for="previous_button_image" class="inline"><?php esc_html_e( 'Image', 'gravityforms' ); ?><?php gform_tooltip( 'previous_button_image' ); ?></label>
</div>
</fieldset>
<div id="previous_button_text_container" style="margin-top:5px;">
<label for="previous_button_text_input" class="inline">
<?php esc_html_e( 'Text:', 'gravityforms' ); ?>
</label>
<input type="text" id="previous_button_text_input" class="input_size_b" autocomplete="off"/>
</div>
<div id="previous_button_image_container" style="margin-top:5px;">
<label for="previous_button_image_url" class="inline">
<?php esc_html_e( 'Image Path:', 'gravityforms' ); ?>
</label>
<input type="text" id="previous_button_image_url" autocomplete="off"/>
</div>
</li>
<?php
do_action( 'gform_field_standard_settings', 250, $form_id );
?>
<li class="disable_margins_setting field_setting">
<input type="checkbox" id="field_margins" onclick="SetHTMLMargins( this.checked );" onkeypress="SetHTMLMargins( 'disableMargins' );"/>
<label for="field_margins" class="inline">
<?php esc_html_e( 'Disable default margins', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_disable_margins' ); ?>
</label><br/>
</li>
<?php
do_action( 'gform_field_standard_settings', 300, $form_id );
?>
<li class="post_custom_field_type_setting field_setting">
<label for="post_custom_field_type" class="section_label">
<?php esc_html_e( 'Field Type', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_type' ); ?>
</label>
<select id="post_custom_field_type" onchange="if(jQuery(this).val() == ''){return;
} StartChangePostCustomFieldType(jQuery('#post_custom_field_type').val());">
<optgroup class="option_header" label="<?php esc_attr_e( 'Standard Fields', 'gravityforms' ); ?>">
<option value="text"><?php esc_html_e( 'Single line text', 'gravityforms' ); ?></option>
<option value="textarea"><?php esc_html_e( 'Paragraph Text', 'gravityforms' ); ?></option>
<option value="select"><?php esc_html_e( 'Drop Down', 'gravityforms' ); ?></option>
<option value="multiselect"><?php esc_html_e( 'Multi Select', 'gravityforms' ); ?></option>
<option value="number"><?php esc_html_e( 'Number', 'gravityforms' ); ?></option>
<option value="checkbox"><?php esc_html_e( 'Checkboxes', 'gravityforms' ); ?></option>
<option value="radio"><?php esc_html_e( 'Radio Buttons', 'gravityforms' ); ?></option>
<option value="hidden"><?php esc_html_e( 'Hidden', 'gravityforms' ); ?></option>
</optgroup>
<optgroup class="option_header" label="<?php esc_html_e( 'Advanced Fields', 'gravityforms' ); ?>">
<option value="date"><?php esc_html_e( 'Date', 'gravityforms' ); ?></option>
<option value="time"><?php esc_html_e( 'Time', 'gravityforms' ); ?></option>
<option value="phone"><?php esc_html_e( 'Phone', 'gravityforms' ); ?></option>
<option value="website"><?php esc_html_e( 'Website', 'gravityforms' ); ?></option>
<option value="email"><?php esc_html_e( 'Email', 'gravityforms' ); ?></option>
<option value="fileupload"><?php esc_html_e( 'File Upload', 'gravityforms' ); ?></option>
<option value="list"><?php esc_html_e( 'List', 'gravityforms' ); ?></option>
</optgroup>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 350, $form_id );
?>
<li class="post_tag_type_setting field_setting">
<label for="post_tag_type" class="section_label">
<?php esc_html_e( 'Field Type', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_type' ); ?>
</label>
<select id="post_tag_type" onchange="if(jQuery(this).val() == ''){return;
} StartChangeInputType(jQuery('#post_tag_type').val());">
<option value="text"><?php esc_html_e( 'Single line text', 'gravityforms' ); ?></option>
<option value="select"><?php esc_html_e( 'Drop Down', 'gravityforms' ); ?></option>
<option value="checkbox"><?php esc_html_e( 'Checkboxes', 'gravityforms' ); ?></option>
<option value="radio"><?php esc_html_e( 'Radio Buttons', 'gravityforms' ); ?></option>
<option value="multiselect"><?php esc_html_e( 'Multi Select', 'gravityforms' ); ?></option>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 400, $form_id );
?>
<?php
if ( class_exists( 'ReallySimpleCaptcha' ) ) {
//the field_captcha_type drop down has options dynamically added in form_editor.js for the v1/v2 versions of google recaptcha
?>
<li class="captcha_type_setting field_setting">
<label for="field_captcha_type">
<?php esc_html_e( 'Type', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_captcha_type' ); ?>
</label>
<select id="field_captcha_type" onchange="StartChangeCaptchaType(jQuery(this).val());">
<option value="simple_captcha"><?php esc_html_e( 'Really Simple CAPTCHA', 'gravityforms' ); ?></option>
<option value="math"><?php esc_html_e( 'Math Challenge', 'gravityforms' ); ?></option>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 450, $form_id );
?>
<li class="captcha_size_setting field_setting">
<label for="field_captcha_size">
<?php esc_html_e( 'Size', 'gravityforms' ); ?>
</label>
<select id="field_captcha_size" onchange="SetCaptchaSize(jQuery(this).val());">
<option value="small"><?php esc_html_e( 'Small', 'gravityforms' ); ?></option>
<option value="medium"><?php esc_html_e( 'Medium', 'gravityforms' ); ?></option>
<option value="large"><?php esc_html_e( 'Large', 'gravityforms' ); ?></option>
</select>
</li>
<?php
do_action( 'gform_field_standard_settings', 500, $form_id );
?>
<li class="captcha_fg_setting field_setting">
<label for="field_captcha_fg">
<?php esc_html_e( 'Font Color', 'gravityforms' ); ?>
</label>
<?php self::color_picker( 'field_captcha_fg', 'SetCaptchaFontColor' ); ?>
</li>
<?php
do_action( 'gform_field_standard_settings', 550, $form_id );
?>
<li class="captcha_bg_setting field_setting">
<label for="field_captcha_bg">
<?php esc_html_e( 'Background Color', 'gravityforms' ); ?>
</label>
<?php self::color_picker( 'field_captcha_bg', 'SetCaptchaBackgroundColor' ) ?>
</li>
<?php
}
do_action( 'gform_field_standard_settings', 600, $form_id );
$recaptcha_type = get_option( 'rg_gforms_captcha_type' );
$recaptcha_image_base = $recaptcha_type == 'invisible' ? '/images/captcha_invisible_' : '/images/captcha_';
?>
<li class="captcha_theme_setting field_setting">
<label for="field_captcha_theme" class="section_label">
<?php esc_html_e( 'Theme', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_recaptcha_theme' ); ?>
</label>
<select id="field_captcha_theme" onchange="SetCaptchaTheme(this.value, '<?php echo GFCommon::get_base_url() . $recaptcha_image_base ?>' + this.value + '.jpg')">
<option value="light"><?php esc_html_e( 'Light', 'gravityforms' ); ?></option>
<option value="dark"><?php esc_html_e( 'Dark', 'gravityforms' ); ?></option>
</select>
</li>
<?php
if ( $recaptcha_type == 'invisible' ) {
do_action( 'gform_field_standard_settings', 625, $form_id );
?>
<li class="captcha_badge_setting field_setting">
<label for="field_captcha_badge" class="section_label">
<?php esc_html_e( 'Badge Position', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_recaptcha_badge' ); ?>
</label>
<select id="field_captcha_badge" onchange="SetFieldProperty('captchaBadge', jQuery(this).val());">
<option value="bottomright"><?php esc_html_e( 'Bottom Right', 'gravityforms' ); ?></option>
<option value="bottomleft"><?php esc_html_e( 'Bottom Left', 'gravityforms' ); ?></option>
<option value="inline"><?php esc_html_e( 'Inline', 'gravityforms' ); ?></option>
</select>
</li>
<?php
}
do_action( 'gform_field_standard_settings', 650, $form_id );
?>
<li class="post_custom_field_setting field_setting">
<fieldset>
<legend class="section_label">
<?php esc_html_e( 'Custom Field Name', 'gravityforms' ); ?>
<?php gform_tooltip( 'form_field_custom_field_name' ); ?>
</legend>
<div class="gform_inline_options">
<div>
<input type="radio" name="field_custom" id="field_custom_existing" onclick="ToggleCustomField();" onkeypress="ToggleCustomField();"/>
<label for="field_custom_existing" class="inline"><?php esc_html_e( 'Existing', 'gravityforms' ); ?></label>
</div>
<div>
<input type="radio" name="field_custom" id="field_custom_new" onclick="ToggleCustomField();" onkeypress="ToggleCustomField();"/>
<label for="field_custom_new" class="inline"><?php esc_html_e( 'New', 'gravityforms' ); ?></label>
</div>
</div>
</fieldset>
<input type="text" id="field_custom_field_name_text" autocomplete="off"/>
<select id="field_custom_field_name_select" onchange="SetFieldProperty( 'postCustomFieldName', jQuery(this).val() );" style="max-width:100%;">
<option value=""><?php esc_html_e( 'Select an existing custom field', 'gravityforms' ); ?></option>
<?php
$custom_field_names = RGFormsModel::get_custom_field_names();
foreach ( $custom_field_names as $name ) {
?>
<option value="<?php echo esc_attr( $name ); ?>"><?php echo esc_html( $name ); ?></option>