SELECT 'form' AS component, 'User Profile' AS title, 'save.sql' AS action;
-- Text input
SELECT 'text' AS type, 'Name' AS name, TRUE AS required;
-- Email input with validation
SELECT 'email' AS type, 'Email' AS name, TRUE AS required;
-- Password input
SELECT 'password' AS type, 'Password' AS name, TRUE AS required;
-- Number input with range
SELECT 'number' AS type, 'Age' AS name, 0 AS min, 120 AS max;
-- Date and time
SELECT 'date' AS type, 'Birth Date' AS name;
SELECT 'datetime-local' AS type, 'Appointment' AS name;
-- Dropdown select
SELECT 'select' AS type, 'Category' AS name, TRUE AS required,
JSON_ARRAY(
JSON_OBJECT('label', 'Work', 'value', 'work'),
JSON_OBJECT('label', 'Personal', 'value', 'personal')
) AS options;
-- Textarea
SELECT 'textarea' AS type, 'Notes' AS name, 5 AS rows;
-- Checkbox
SELECT 'checkbox' AS type, 'Subscribe' AS name, 'Subscribe to newsletter' AS label;
-- Radio buttons
SELECT 'radio' AS type, 'Priority' AS name, 'High' AS value, 'High Priority' AS label;
SELECT 'radio' AS type, 'Priority' AS name, 'Low' AS value, 'Low Priority' AS label;
-- File upload
SELECT 'file' AS type, 'Avatar' AS name, 'image/*' AS accept;
-- Hidden field
SELECT 'hidden' AS type, 'user_id' AS name, '123' AS value;