Mark error in form using Bootstrap

后端 未结 7 2290
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 07:52

I\'ve started using Bootstrap in order to achieve a nice page design without resorting to GWT (the backend is made in java)

For my login screen I copied this example

7条回答
  •  抹茶落季
    2020-12-07 08:10

    Generally showing the error near where the error occurs is best. i.e. if someone has an error with entering their email, you highlight the email input box.

    This article has a couple good examples. http://uxdesign.smashingmagazine.com/2011/05/27/getting-started-with-defensive-web-design/

    Also twitter bootstrap has some nice styling that helps with that (scroll down to the Validation states section) http://twitter.github.com/bootstrap/base-css.html#forms

    Highlighting each input box is a bit more complicated, so the easy way would be to just put an bootstrap alert at the top with details of what the user did wrong. http://twitter.github.com/bootstrap/components.html#alerts

提交回复
热议问题