<?php // $file = /home/bluedoor/www/dev/wp-content/plugins/yooessentials/modules/form/config/customizer.json

return [
  'panels' => [
    'yooessentials-advanced' => [
      'fields' => [
        '_addons' => [
          'fields' => [
            'form.state' => [
              'enable' => true
            ]
          ]
        ]
      ]
    ], 
    'yooessentials-form-settings' => [
      'title' => 'Form Area', 
      'fields' => [
        'yooessentials_form.after_submit_actions' => [
          'label' => 'After Submit Actions', 
          'description' => 'Set actions to be executed after a form has been successfully submitted. The established order is respected when possible.', 
          'type' => 'yooessentials-form-actions', 
          'txtAdd' => 'Add Action', 
          'txtEmpty' => 'No actions yet.'
        ], 
        'yooessentials_form.html5validation' => [
          'text' => 'HTML 5 Validation', 
          'description' => 'Enable client side HTML5 validation. Server side validation is always executed.', 
          'type' => 'checkbox', 
          'default' => true
        ], 
        'yooessentials_form.reset_after_submit' => [
          'text' => 'Reset After Submit', 
          'description' => 'Reset form to initial state after successfull submission.', 
          'type' => 'checkbox', 
          'default' => true
        ], 
        'yooessentials_form.errors_display_modal' => [
          'label' => 'Errors Display', 
          'text' => 'Display Errors in a Modal', 
          'description' => 'Display server side errors in a Modal instead of the bottom block.', 
          'type' => 'checkbox'
        ], 
        'yooessentials_form.errors_display_modal_content' => [
          'type' => 'editor', 
          'mode' => 'text/html', 
          'description' => 'Set a custom modal content or leave empty for default. Use <code>{errors}</code> placeholder to reference the errors list.', 
          'show' => 'yooessentials_form.errors_display_modal'
        ], 
        'yooessentials_form.errors_display_modal_center' => [
          'type' => 'checkbox', 
          'text' => 'Vertically center the modal', 
          'show' => 'yooessentials_form.errors_display_modal'
        ], 
        'yooessentials_form.name' => [
          'label' => 'Name Attribute', 
          'description' => 'Optional Name attribute for the form node.'
        ], 
        'yooessentials_form.id' => [
          'label' => 'ID Attribute'
        ], 
        'yooessentials_form.class' => [
          'label' => 'Class Attribute'
        ], 
        'yooessentials_form.override_action_url' => [
          'label' => 'Submission', 
          'text' => 'Override Submission Action', 
          'type' => 'checkbox', 
          'description' => 'Submit the form to a custom URL and method, useful for 3rd party form integrations.', 
          'default' => false
        ], 
        'yooessentials_form.action_url' => [
          'label' => 'Action URL'
        ], 
        'yooessentials_form.action_method' => [
          'label' => 'Action Method', 
          'type' => 'select', 
          'options' => [
            'GET' => 'GET', 
            'POST' => 'POST'
          ], 
          'default' => 'POST'
        ], 
        'yooessentials_form.scripts_onsubmit' => [
          'label' => 'Before Submission Scripts', 
          'description' => 'Add custom JavaScript which runs before a submission is sent. The &lt;script&gt; tag is not needed. Return false if you want the submission to be prevented. Available variables are <code>event</code> and <code>form</code>.', 
          'type' => 'editor', 
          'editor' => 'code', 
          'mode' => 'javascript'
        ], 
        'yooessentials_form.scripts_onsubmitted' => [
          'label' => 'After Submission Scripts', 
          'description' => 'Add custom JavaScript which runs after a successful submission. The &lt;script&gt; tag is not needed. Available variables are <code>event</code>, <code>form</code>, <code>data</code>, and <code>response</code>.', 
          'type' => 'editor', 
          'editor' => 'code', 
          'mode' => 'javascript'
        ], 
        'yooessentials_form.scripts_onvalidationerror' => [
          'label' => 'After Validation Error Scripts', 
          'description' => 'Add custom JavaScript which runs after a failed validation. The &lt;script&gt; tag is not needed. Available variables are <code>event</code>, <code>form</code>, and <code>data</code>.', 
          'type' => 'editor', 
          'editor' => 'code', 
          'mode' => 'javascript'
        ], 
        'yooessentials_form.scripts_onsubmissionerror' => [
          'label' => 'After Submission Error Scripts', 
          'description' => 'Add custom JavaScript which runs after a failed submission. The &lt;script&gt; tag is not needed. Available variables are <code>event</code>, <code>form</code>, <code>data</code>, <code>errors</code>, and <code>validation</code>.', 
          'type' => 'editor', 
          'editor' => 'code', 
          'mode' => 'javascript'
        ]
      ], 
      'fieldset' => [
        'default' => [
          'type' => 'tabs', 
          'fields' => [[
              'title' => 'Actions', 
              'fields' => ['yooessentials_form.after_submit_actions']
            ], [
              'title' => 'Settings', 
              'fields' => ['yooessentials_form.html5validation', 'yooessentials_form.reset_after_submit', 'yooessentials_form.errors_display_modal', 'yooessentials_form.errors_display_modal_content', 'yooessentials_form.errors_display_modal_center']
            ], [
              'title' => 'Advanced', 
              'fields' => ['yooessentials_form.name', [
                  'name' => '_style', 
                  'type' => 'grid', 
                  'width' => '1-2', 
                  'description' => 'Optional ID and Class attributes for the form node, useful for styling or customizations.', 
                  'fields' => ['yooessentials_form.id', 'yooessentials_form.class']
                ], 'yooessentials_form.override_action_url', [
                  'name' => '_action_override', 
                  'type' => 'grid', 
                  'width' => '1-2', 
                  'show' => 'yooessentials_form.override_action_url', 
                  'fields' => ['yooessentials_form.action_url', 'yooessentials_form.action_method']
                ], 'yooessentials_form.scripts_onsubmit', 'yooessentials_form.scripts_onsubmitted', 'yooessentials_form.scripts_onvalidationerror', 'yooessentials_form.scripts_onsubmissionerror']
            ]]
        ]
      ]
    ]
  ]
];
