Also, the last two parameters should be in a list, i.e.
said(_Req) -> form(fun(Data) -> link(["you said: ", arg(Data, "foo")], "click here") end, [input("foo"), submit()]).
handle(_, [{said, Value}|_]) -> {Value, {ehtml, {a, [{href, self}], "click me"}}}; handle(S, [_|R]) -> handle(S, R); handle([], []) -> {[], {ehtml, {form, [{action, self}], [{input, [{type, "text"}, {name, "said"}, {size, 50}], []}, {input, [{type, "submit"}]}]}}}; handle(S, []) -> {S, {ehtml, {p, [], io_lib:format("you said: ~s", [S])}}}.
-----