PluginProbe
Hash Form – Drag & Drop Form Builder / trunk
Hash Form – Drag & Drop Form Builder vtrunk
1.4.4 1.4.3 1.4.2 1.4.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.6.1 1.2.7 1.2.8 1.2.9 1.3.0 All 47 releases
hash-form / admin / forms / settings / conditional-logic.php

conditional-logic.php in Hash Form – Drag & Drop Form Builder trunk, at admin/forms/settings/conditional-logic.php

40 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined('ABSPATH') || die();
3 /*
4 * A template, included from inside a class method - never loaded on its own.
5 * The variables below are locals of the method that includes it, not globals,
6 * which is what the prefix sniff assumes about a file-scope assignment.
7 */
8 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included from within a method, so these are function locals.
9
10 $conditional_logics = HashFormBuilder::get_show_hide_conditions($id);
11 ?>
12 <div class="hf-form-container">
13 <div class="hf-form-row">
14 <p class="hf-section-help">
15 <?php esc_html_e('Show or hide a field based on what the visitor has answered elsewhere in this form. Rules are checked as they type, and again when the form is submitted.', 'hash-form'); ?>
16 </p>
17
18 <div class="hf-condition-list<?php echo empty($conditional_logics) ? ' hf-condition-list-empty' : ''; ?>">
19 <div class="hf-condition-empty">
20 <span class="mdi mdi-directions-fork" aria-hidden="true"></span>
21 <p class="hf-condition-empty-title"><?php esc_html_e('No rules yet', 'hash-form'); ?></p>
22 <p class="hf-condition-empty-text"><?php esc_html_e('Every field is shown to everyone until you add one.', 'hash-form'); ?></p>
23 </div>
24
25 <div class="hf-condition-rows">
26 <?php
27 foreach ($conditional_logics as $row) {
28 HashFormBuilder::condition_row_html($fields, $row);
29 }
30 ?>
31 </div>
32 </div>
33
34 <button type="button" class="hf-add-more-condition">
35 <span class="mdi mdi-plus" aria-hidden="true"></span>
36 <?php esc_html_e('Add Condition', 'hash-form'); ?>
37 </button>
38 </div>
39 </div>
40