bilus / reforms

Beautiful Bootstrap 3 forms for Om, Reagent and Rum.
Eclipse Public License 1.0
168 stars 7 forks source link

REQ: Make label optional #2

Closed ryanbaldwin closed 8 years ago

ryanbaldwin commented 9 years ago

Great little library you've started here. Nice work!

Feature request: make labels optional.

bilus commented 9 years ago

Good idea, I'll see what I can do. Thanks!

bilus commented 9 years ago

I have good news for you. Check out the master branch (commit 0b194551f4b88350daac9a260f92971300ccea28 version 0.4.0-SNAPSHOT on clojars). It lets you skip the label argument and put the (optional) placeholder into options like that:

; With label:
(f/text "Your name" data [:name] :placeholder "Type your name here")
; Without label:
(f/text data [:name] :placeholder "Type your name here")

Placeholder as a positional argument is still supported but generates a deprecation warning:

; Don't do that anymore
(f/text "Your name" "Type your name here" data [:name])

This isn't production-ready yet (plus there are more features to be added until 0.4.0 is out) so if you notice any bugs, do let me know.

ryanbaldwin commented 9 years ago

Groovy man. Thanks!

On Tue, Jul 28, 2015 at 9:52 AM, bilus notifications@github.com wrote:

I have good news for you. Check out the master branch (version 0.4.0-SNAPSHOT). It lets you skip the label argument and put the (optional) placeholder into options like that:

; With label:
(f/text "Your name" data [:name] :placeholder "Type your name here")
; Without label:
(f/text data [:name] :placeholder "Type your name here")

placeholder as a positional argument is still supported but generates a deprecation warning:

; Don't do that anymore
(f/text "Your name" "Type your name here" data [:name])

This isn't production-ready yet (plus there are more features to be added until 0.4.0 is out) so if you notice any bugs, do let me know.

Reply to this email directly or view it on GitHub: https://github.com/bilus/reforms/issues/2#issuecomment-125617761