teropa/hiccups — Issue #2: #id sugar doesn't work for forms nor inputs
Author: bobby
Created: 2011-10-14 20:20:24+00:00
State: open

I seem not to be able to use the :form#id syntax with forms nor with inputs. The elements render without a tag name, causing them to print as strings when added to the DOM.

This:

(hiccups/defhtml sign-in-form []
[:form#sign-in {:action "#/sign-in" :method "post"}
[:fieldset {:legend "Sign In"}
[:ol.form-elements
[:li.text
[:label {:for "sign-in-email"} "Email"]
[:input#sign-in-email {:name "email" :type "text"}]]
[:li.password
[:label {:for "sign-in-password"} "Password"]
[:input#sign-in-password {:name "password" :type "password"}]]
[:li.submit
[:input {:type "submit" :value "Sign in"}]]]]])

Outputs this:

"< action=\"#/sign-in\" method=\"post\">

Email< name=\"email\" type=\"text\" />
Password< name=\"password\" type=\"password\" />

"