Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions classes/controllers/FrmTestModeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ private static function render_testing_mode_container() {
}

if ( ! empty( $form->options['chat'] ) ) {
// Track view test mode with chat form.
FrmUsageController::update_flows_data( 'view_test_mode', 'chat_form' );
echo '<div class="frm_note_style">' . esc_html__( 'Test Mode is currently not supported for conversational forms.', 'formidable' ) . '</div>';
return;
}
Expand Down Expand Up @@ -143,6 +145,10 @@ private static function render_testing_mode_container() {

self::include_svg();

if ( ! $enabled ) {
FrmUsageController::update_flows_data( 'view_test_mode', 'no_addon' );
}

include FrmAppHelper::plugin_path() . '/classes/views/test-mode/container.php';
}

Expand Down
2 changes: 1 addition & 1 deletion classes/controllers/FrmUsageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static function ajax_track_flows() {
}

/**
* Updates flows data.
* Updates flows data. This increases the count of flow_data[ $key ][ $value ].
*
* @since 6.16.1
*
Expand Down
11 changes: 11 additions & 0 deletions classes/views/test-mode/container.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@
}
?>
</select>

<?php
// Prints hidden inputs to map the form action ID and type.
foreach ( $form_actions as $form_action ) {
printf(
'<input type="hidden" name="frm_testmode[form_action_types][%d]" value="%s">',
intval( $form_action->ID ),
esc_attr( $form_action->post_excerpt )
);
}
?>
</div>
</label>
</div>
Expand Down