-- =============================================================================
-- fix_mystateconnews_forms_no_dashes.sql — mystateCONnews form text without
-- dashes (13 Nov 2026): form names, success messages, field labels and
-- dropdown choices. Submissions already received keep the wording they were
-- sent with. Only rows that still hold the previous text exactly are
-- updated, so anything edited in Aggie is kept.
--
-- GENERATED from the site content by a script. Idempotent.
-- =============================================================================
SET NAMES utf8mb4;
SET @site_id := (SELECT id FROM dim_web_sites WHERE public_site_key = 'YPIYmVgmODxVTxgcSNwb1yAKdCtFe1M9kGT5YnTxEkL3xxs9' LIMIT 1);

UPDATE dim_web_forms SET success_message = 'Quote request received. Our team will respond within 1 to 2 business days.' WHERE site_id = @site_id AND form_key = 'quote-request' AND CONVERT(success_message USING utf8mb4) = CONVERT('Quote request received. Our team will respond within 1–2 business days.' USING utf8mb4);
UPDATE dim_web_form_fields SET config_json = '{"options":["South Carolina, Open"]}' WHERE form_id = (SELECT id FROM (SELECT id FROM dim_web_forms WHERE site_id = @site_id AND form_key = 'quote-request') AS x) AND field_key = 'state' AND CONVERT(config_json USING utf8mb4) = CONVERT('{"options":["South Carolina — Open"]}' USING utf8mb4);
UPDATE dim_web_form_fields SET config_json = '{"options":["CON Application, New Facility","CON Application, Amendment","CON Application, Withdrawal","Other"]}' WHERE form_id = (SELECT id FROM (SELECT id FROM dim_web_forms WHERE site_id = @site_id AND form_key = 'quote-request') AS x) AND field_key = 'noticeType' AND CONVERT(config_json USING utf8mb4) = CONVERT('{"options":["CON Application — New Facility","CON Application — Amendment","CON Application — Withdrawal","Other"]}' USING utf8mb4);
UPDATE dim_web_form_fields SET config_json = '{"options":["1 run","2 runs","3 runs","Not sure, confirm with us"]}' WHERE form_id = (SELECT id FROM (SELECT id FROM dim_web_forms WHERE site_id = @site_id AND form_key = 'quote-request') AS x) AND field_key = 'runs' AND CONVERT(config_json USING utf8mb4) = CONVERT('{"options":["1 run","2 runs","3 runs","Not sure — confirm with us"]}' USING utf8mb4);
UPDATE dim_web_forms SET success_message = 'Message received! We''ll follow up within 1 to 2 business days.' WHERE site_id = @site_id AND form_key = 'contact' AND CONVERT(success_message USING utf8mb4) = CONVERT('Message received! We''ll follow up within 1–2 business days.' USING utf8mb4);
UPDATE dim_web_form_fields SET config_json = '{"options":["CON Application, New Facility or Service","CON Application, Amendment","CON Application, Withdrawal","CON Renewal","Other CON Related Notice"]}' WHERE form_id = (SELECT id FROM (SELECT id FROM dim_web_forms WHERE site_id = @site_id AND form_key = 'con-notice-submission') AS x) AND field_key = 'noticeType' AND CONVERT(config_json USING utf8mb4) = CONVERT('{"options":["CON Application — New Facility or Service","CON Application — Amendment","CON Application — Withdrawal","CON Renewal","Other CON-Related Notice"]}' USING utf8mb4);
UPDATE dim_web_form_fields SET config_json = '{"options":["1 run (verify your state''s requirements)","2 runs","3 runs","Other, confirm with operations team"]}' WHERE form_id = (SELECT id FROM (SELECT id FROM dim_web_forms WHERE site_id = @site_id AND form_key = 'con-notice-submission') AS x) AND field_key = 'runs' AND CONVERT(config_json USING utf8mb4) = CONVERT('{"options":["1 run (verify your state''s requirements)","2 runs","3 runs","Other — confirm with operations team"]}' USING utf8mb4);
UPDATE dim_web_form_fields SET config_json = '{"options":["Hospital / Health System","Nursing Facility / Long Term Care","Ambulatory Surgical Center","Hospice Provider","Memory Care / Psychiatric Facility","Healthcare Real Estate Developer","Law Firm / Attorney (filing on behalf of client)","Consultant / Regulatory Affairs","Other"]}' WHERE form_id = (SELECT id FROM (SELECT id FROM dim_web_forms WHERE site_id = @site_id AND form_key = 'con-notice-submission') AS x) AND field_key = 'organizationType' AND CONVERT(config_json USING utf8mb4) = CONVERT('{"options":["Hospital / Health System","Nursing Facility / Long-Term Care","Ambulatory Surgical Center","Hospice Provider","Memory Care / Psychiatric Facility","Healthcare Real Estate Developer","Law Firm / Attorney (filing on behalf of client)","Consultant / Regulatory Affairs","Other"]}' USING utf8mb4);
UPDATE dim_web_forms SET success_message = 'Thanks, we''ll email you the current status of your request within 1 business day.' WHERE site_id = @site_id AND form_key = 'request-status' AND CONVERT(success_message USING utf8mb4) = CONVERT('Thanks — we''ll email you the current status of your request within 1 business day.' USING utf8mb4);
