Jake Vanderwerf
2025-12-21 3aada9949d51024a92a8b5c6cb70d12f9c3cac16
inc/blocks/FormBlock.php
@@ -35,7 +35,7 @@
   public function __construct()
   {
      $this->cache = new CacheManager('form_blocks', HOUR_IN_SECONDS);
      $this->cache = CacheManager::for('form_blocks', WEEK_IN_SECONDS);
      // Initialize forms from filter
      $this->forms = $this->registerForms();
@@ -52,7 +52,8 @@
   public function registerBlock()
   {
      register_block_type($this->path, [
         'render_callback' => [$this, 'render']
         'render_callback' => [$this, 'render'],
         'style' => 'jvb-icons-forms',
      ]);
   }
@@ -289,6 +290,8 @@
         foreach ($form_config['fields'] as $field_name => $field_config) {
            $meta->render('form', $field_name, $field_config);
         }
         $submit_text = $form_config['submit'] ?? 'Submit';
         echo '<button type="submit" class="button primary">' . esc_html($submit_text) . '</button>';
      }
   }
@@ -435,11 +438,6 @@
         ];
      }
      error_log('Form Localization: '.print_r([
         'formTypes' => $form_types,
         'availableForms' => $this->forms,
         'nonce'        => wp_create_nonce('jvbForm')
      ], true));
      wp_localize_script('jvb-forms-editor-script', 'jvbFormsData', [
         'formTypes' => $form_types,
         'availableForms' => $this->forms,