From adbcc432b226296f47500088339d8b971c880bb2 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Wed, 15 Jan 2025 13:46:49 +1300 Subject: [PATCH] Allow getting value of hypertext input This is probably not the best but is the simplest --- init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.lua b/init.lua index 33b100e..1c4c30c 100644 --- a/init.lua +++ b/init.lua @@ -833,6 +833,11 @@ local function parse_callbacks(tree, ctx_form, auto_name_id, get_transformer(node, tablecolumn_count, formspec_version) or default_field_value_transformer + elseif node.type == "hypertext" then + -- Experimental (may be broken in the future): Allow accessing + -- hypertext fields with "ctx.form.hypertext_name" as this is + -- the most straightforward way of doing it. + saved_fields[node_name] = default_field_value_transformer end end