# hash-form/trunk/admin/forms/settings/settings.php

Hash Form – Drag &amp; Drop Form Builder, version trunk. 114 lines.

- Page: https://pluginprobe.com/plugins/hash-form/trunk/code/admin/forms/settings/settings.php
- Raw: https://pluginprobe.com/plugins/hash-form/trunk/raw/admin/forms/settings/settings.php
- Modified: 2026-08-27T17:23:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/hash-form/trunk/code/admin/forms/settings/settings.php#L10-L20`.

```php
<?php
defined('ABSPATH') || die();
/*
 * A template, included from inside a class method - never loaded on its own.
 * The variables below are locals of the method that includes it, not globals,
 * which is what the prefix sniff assumes about a file-scope assignment.
 */
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included from within a method, so these are function locals.

$id = HashFormHelper::get_var('id', 'absint', 0);
$form = HashFormBuilder::get_form_vars($id);
$fields = HashFormFields::get_form_fields($id);

$settings = $form->settings ? $form->settings : HashFormHelper::get_form_settings_default();
?>
<div id="hf-wrap" class="hf-content">
    <?php
    self::get_admin_header(
        array(
            'form' => $form,
            'class' => 'hf-header-nav',
        )
    );

    /*
     * 'desc' is optional: it is the one line under the panel heading saying
     * what the tab governs. Sections added through the filter below that do
     * not set one simply get the heading on its own.
     */
    $sections = array(
        'email-settings' => array(
            'name' => esc_html__('Email Settings', 'hash-form'),
            'icon' => 'mdi mdi-email-outline',
            'desc' => esc_html__('The notification sent to you each time this form is submitted.', 'hash-form'),
        ),
        'auto-responder' => array(
            'name' => esc_html__('Auto Responder', 'hash-form'),
            'icon' => 'mdi mdi-email-arrow-left-outline',
            'desc' => esc_html__('An automatic reply sent back to whoever filled in the form.', 'hash-form'),
        ),
        'form-confirmation' => array(
            'name' => esc_html__('Confirmation', 'hash-form'),
            'icon' => 'mdi mdi-send-check',
            'desc' => esc_html__('What the visitor sees once the form has been submitted, and what they see if it fails.', 'hash-form'),
        ),
        'conditional-logic' => array(
            'name' => esc_html__('Conditional Logic', 'hash-form'),
            'icon' => 'mdi mdi-checkbox-multiple-marked-outline',
            'desc' => esc_html__('Show and hide fields based on the answers already given.', 'hash-form'),
        ),
        'restrictions' => array(
            'name' => esc_html__('Restrictions', 'hash-form'),
            'icon' => 'mdi mdi-lock-outline',
            'desc' => esc_html__('Limit who may submit this form and how often.', 'hash-form'),
        ),
        'import-export' => array(
            'name' => esc_html__('Import/Export', 'hash-form'),
            'icon' => 'mdi mdi-swap-horizontal',
            'desc' => esc_html__('Move this form between sites, or keep a copy of it as a file.', 'hash-form'),
        ),
    );
    $sections = apply_filters('hashform_settings_sections', $sections);
    $current = 'email-settings';
    ?>

    <div class="hf-body">
        <div class="hf-fields-sidebar">
            <ul class="hf-settings-tab">
                <?php foreach ($sections as $key => $section) { ?>
                    <li class="<?php echo ($current === $key ? 'hf-active' : ''); ?>">
                        <a href="#hf-<?php echo esc_attr($key); ?>">
                            <i class="<?php echo esc_attr($section['icon']) ?>"></i>
                            <?php echo esc_html($section['name']); ?>
                        </a>
                    </li>
                <?php } ?>
            </ul>
        </div>

        <div id="hf-form-panel">
            <?php HashFormHelper::print_message(); ?>
            <div class="hf-form-wrap">
                <form method="post" id="hf-settings-form">
                    <input type="hidden" name="id" id="form_id" value="<?php echo esc_attr($id); ?>" />
                    <?php
                    wp_nonce_field('hashform_process_form_action', 'hashform_process_form_nonce');
                    foreach ($sections as $key => $section) {
                        ?>
                        <div id="hf-<?php echo esc_attr($key); ?>" class="<?php echo (($current === $key) ? '' : ' hf-hidden'); ?>">
                            <div class="hf-panel-head">
                                <h2><?php echo esc_html($section['name']); ?></h2>
                                <?php if (!empty($section['desc'])) { ?>
                                    <p class="hf-panel-desc"><?php echo esc_html($section['desc']); ?></p>
                                <?php } ?>
                            </div>
                            <?php
                            $file_path = HASHFORM_PATH . 'admin/forms/settings/';
                            if (file_exists($file_path . esc_attr($key) . '.php')) {
                                require $file_path . esc_attr($key) . '.php';
                            }
                            do_action('hashform_settings_sections_content', array(
                                'section_key' => $key,
                                'settings' => $settings,
                                'fields' => $fields,
                                'form_id' => $id
                            ));
                            ?>
                        </div>
                    <?php } ?>
                </form>
            </div>
        </div>
    </div>
</div>
```
