Coder Social home page Coder Social logo

Comments (6)

potenza avatar potenza commented on July 24, 2024 1

@desheikh I apologize, I made a mistake. I completely blanked that check boxes need to be wrapped in a form group to render the error properly:

<%= f.form_group :terms, label: { text: "Optional Label" } do %>
  <%= f.check_box :terms do %>
    You need to check this box to accept our terms of service and privacy policy
  <% end %>
<% end %>

from bootstrap_form.

potenza avatar potenza commented on July 24, 2024

@desheikh Thanks. The checkbox error handling seems to be non-existent. After looking at how Bootstrap defines the .has-error class, I think we might need to wrap the checkbox container inside another with the .has-error class. We also need to pull the error message into a help-block.

from bootstrap_form.

desheikh avatar desheikh commented on July 24, 2024

@potenza yup, havn't had time yet, but I'll try and submit a PR soon.

from bootstrap_form.

potenza avatar potenza commented on July 24, 2024

@desheikh I was wondering if you had a chance to look at this yet? Let me know if you're too busy and I'll try to dig in later this week. I just don't want to duplicate the effort if you've already started. Thanks.

from bootstrap_form.

desheikh avatar desheikh commented on July 24, 2024

@potenza, If you can push out a fix earlier that'd be great. I havn't really had much time than take a cursory look. It might just be simpler to have a separate method to wrap radio_button and check_box tag, because the required markup is very different from what form_group generates.

from bootstrap_form.

desheikh avatar desheikh commented on July 24, 2024

@potenza thanks, I'll keep that in mind when I get back to the bootstrap3 upgrade branch I've been neglecting for a while now.

from bootstrap_form.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.