From 51c04912dd82476e6dc7488d3c525f53dca670a7 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 10 Feb 2026 02:39:19 +0000
Subject: [PATCH] =minor fix to edit form in CRUDSkeleton.php. Still need to determine why taxonomy fields aren't rendering

---
 inc/meta/Form.php |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/inc/meta/Form.php b/inc/meta/Form.php
index f054157..3b54486 100644
--- a/inc/meta/Form.php
+++ b/inc/meta/Form.php
@@ -208,7 +208,7 @@
 			return '';
 		}
 
-		protected static function buildInput(string $content):string
+		public static function buildInput(string $content):string
 		{
 			return sprintf(
 				'<div class="field-input-wrapper">
@@ -516,7 +516,7 @@
 			$optionsHtml .= sprintf(
 				'<option value="%s"%s>%s</option>',
 				esc_attr($optValue),
-				selected($value, $optValue),
+				selected($value, $optValue, false),
 				esc_html($optLabel)
 			);
 		}
@@ -590,7 +590,7 @@
 				esc_attr($name),
 				$optValue,
 				esc_attr($optValue),
-				checked($value, $optValue),
+				checked($value, $optValue,false),
 				esc_attr($name),
 				$optValue,
 				esc_html($optLabel)
@@ -1654,12 +1654,13 @@
 
 		foreach ($fields as $fieldName => $fieldConfig) {
 			$fieldValue = $values[$fieldName] ?? '';
-			$fullName = "{$name}:{$fieldName}";
+			$fullName = array_key_exists('wrap', $config) ? $fieldName : "{$name}:{$fieldName}";
 			$output .= static::render($fullName, $fieldValue, $fieldConfig);
 		}
 
 		$output .= sprintf('</%s>', esc_attr($wrapper));
 
+		unset($config['label']);
 		return static::fieldWrap($name, $output, $config);
 	}
 

--
Gitblit v1.10.0