snap-extras-0.12.3.0: A collection of useful helpers and utilities for Snap web applications.

Snap.Extras.FormUtils

Contents

Synopsis

# Transformers

maybeTrans :: (Eq a, IsString a) => a -> Result v (Maybe a) Source #

Transform to Nothing if field is empty string

readMayTrans :: Read a => Text -> Result v (Maybe a) Source #

readTrans :: (Read a, IsString v) => Text -> Result v a Source #

Constructs a generalized edit form splice that looks up an ID param specified by the by attribute. You might use this splice as follows:
<editFormSplice by="id">
If you don't specify the by attribute, the default is by="id".