Jake Vanderwerf
2026-04-26 86c6cd3cc099d2480932ede03c12cea01e625c94
inc/registrar/fields/Field.php
@@ -19,6 +19,8 @@
   protected bool $quickEdit = true;   // whether to show in quick edit table
   protected bool $quill;           // whether to use quill
   protected int $maxLength;        // of characters
   protected string $subtype;
   protected array $allowedSubtype = ['text', 'url','number','tel','email','number'];
   /**
    * @var ?bool For timeline post types. Indicates whether all posts get this field, or just the parent
    */
@@ -50,7 +52,7 @@
      foreach ($config as $key => $value) {
         if (property_exists($class, $key)) {
            $method = 'set' . ucfirst($key);
            $method = 'set'.implode('',array_map('ucfirst',explode('_', $key)));;
            $class->$method($value);
         } else {
            error_log('Instance: '.print_r($class, true));
@@ -149,4 +151,16 @@
         }
      }, $config);
   }
   public function setSubtype(string $subtype):void
   {
      if (!in_array($subtype, $this->allowedSubtype)) {
         error_log('[SelectorField]Attempted subtype not allowed: '.$subtype);
         return;
      }
      $this->subtype = $subtype;
   }
   public function getSubtype():string
   {
      return $this->subtype;
   }
}