aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Utils')
-rw-r--r--src/client/elm/Utils/Form.elm11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/elm/Utils/Form.elm b/src/client/elm/Utils/Form.elm
new file mode 100644
index 0000000..6793222
--- /dev/null
+++ b/src/client/elm/Utils/Form.elm
@@ -0,0 +1,11 @@
+module Utils.Form exposing
+ ( fieldAsText
+ )
+
+import Form exposing (Form)
+
+fieldAsText : Form a b -> String -> String
+fieldAsText form field =
+ Form.getFieldAsString field form
+ |> .value
+ |> Maybe.withDefault ""