Created
April 19, 2011 04:42
-
-
Save brentonashworth/926824 to your computer and use it in GitHub Desktop.
Add request header into to form input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defform foo-form "/foo" | |
:fields [(hidden :id) | |
(hidden :remote-addr) | |
(textfield "Enter Your Foo" :foo)] | |
:on-cancel "/" | |
:on-success | |
#(do | |
(flash-put! :message (str %)) | |
"/") | |
:defaults (fn [request] | |
{:foo "bar" | |
:remote-addr (:remote-addr request)})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment