Jake Vanderwerf
21 hours ago f4be611c51473359e6d41780f0313c446079e9d3
inc/meta/Form.php
@@ -53,7 +53,7 @@
   /**
    * Render complete form from Meta instance
    */
   public static function renderFormFrom(Meta $meta, string $endpoint, array $options = []): string
   public static function renderFormFrom(Meta $meta, string $endpoint, array $options = [], array $fields = []): string
   {
      $id = $options['form-id'] ?? $endpoint;
      $classes = isset($options['classes']) ? ' class="' . implode(' ', $options['classes']) . '"' : '';
@@ -70,9 +70,10 @@
            $output .= '<p>' . esc_html($d) . '</p>';
         }
      }
      foreach ($meta->configs() as $name => $config) {
         $output .= static::render($name, $meta->get($name), $config);
      $allFields = $meta->getAll($fields);
      foreach ($allFields as $name => $value) {
         $config = $meta->config($name);
         $output .= static::render($name, $value, $config);
      }
      if (!empty($options['submit'])) {