diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 78dfe52d2..d719d0506 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -64,7 +64,7 @@ jobs:
'acceptance/integrations/woocommerce',
'acceptance/products',
'acceptance/restrict-content',
- 'acceptance/tags',
+ 'acceptance/tags',
]
# Steps to install, configure and run tests
diff --git a/admin/section/class-convertkit-settings-general.php b/admin/section/class-convertkit-settings-general.php
index dd7bf7c10..c23567fb0 100644
--- a/admin/section/class-convertkit-settings-general.php
+++ b/admin/section/class-convertkit-settings-general.php
@@ -172,6 +172,17 @@ public function register_fields() {
);
}
+ add_settings_field(
+ 'non_inline_form',
+ __( 'Default Non-Inline Form (Global)', 'convertkit' ),
+ array( $this, 'non_inline_form_callback' ),
+ $this->settings_key,
+ $this->name,
+ array(
+ 'label_for' => 'non_inline_form',
+ )
+ );
+
add_settings_field(
'debug',
__( 'Debug', 'convertkit' ),
@@ -473,6 +484,61 @@ public function custom_post_types_callback( $args ) {
}
+
+ /**
+ * Renders the input for the Non-inline Form setting.
+ *
+ * @since 2.2.3
+ *
+ * @param array $args Field arguments.
+ */
+ public function non_inline_form_callback( $args ) {
+
+ // Bail if no non-inline Forms exist.
+ if ( ! $this->forms->non_inline_exist() ) {
+ esc_html_e( 'No non-inline Forms exist in ConvertKit.', 'convertkit' );
+ echo '
' . esc_html__( 'Click here to create your first modal, slide in or sticky bar form', 'convertkit' ) . '';
+ return;
+ }
+
+ // Build array of select options.
+ $options = array(
+ '' => esc_html__( 'None', 'convertkit' ),
+ );
+ foreach ( $this->forms->get_non_inline() as $form ) {
+ $options[ esc_attr( $form['id'] ) ] = esc_html( $form['name'] );
+ }
+
+ // Build description with preview link.
+ $preview_url = WP_ConvertKit()->get_class( 'preview_output' )->get_preview_form_home_url();
+ $description = sprintf(
+ '%s %s %s',
+ esc_html__( 'Select a modal, slide in or sticky bar form to automatically display site wide.', 'convertkit' ),
+ '' . esc_html__( 'Click here', 'convertkit' ) . '',
+ esc_html__( 'to preview how this will display.', 'convertkit' )
+ );
+
+ // Build field.
+ $select_field = $this->get_select_field(
+ 'non_inline_form',
+ $this->settings->get_non_inline_form(),
+ $options,
+ $description,
+ array(
+ 'convertkit-select2',
+ 'convertkit-preview-output-link',
+ ),
+ array(
+ 'data-target' => '#convertkit-preview-non-inline-form',
+ 'data-link' => esc_url( $preview_url ) . '&convertkit_form_id=',
+ )
+ );
+
+ // Output field.
+ echo '