Coder Social home page Coder Social logo

Comments (6)

lesleh avatar lesleh commented on July 24, 2024

Actually, I looked further into it and this seems to be a Rails issue.

from bootstrap_form.

lesleh avatar lesleh commented on July 24, 2024

Tested with the default form_for helper of Ruby and that outputs a field with the correct type set. So I'm assuming it's an issue with this library.

<%= bootstrap_form_for @message do |f| %>
    <%= f.email_field :email %>
<% end %>

produces this output:

<input class="form-control" id="message_email" name="message[email]" type="text">

from bootstrap_form.

potenza avatar potenza commented on July 24, 2024

Hi @lesleh,

I just checked our tests and email input type is covered: https://github.com/bootstrap-ruby/rails-bootstrap-forms/blob/master/test/bootstrap_form_test.rb#L116

I also threw together a simple rails app with the latest version (2.1.1) and I it worked fine for me:

<%= bootstrap_form_for @user do |f| %>
  <%= f.email_field :email %>
<% end %>

Outputs:

<div class="form-group">
  <label class="control-label" for="user_email">Email</label>
  <input class="form-control" id="user_email" name="user[email]" type="email">
</div>

What version of the gem are you using?

from bootstrap_form.

lesleh avatar lesleh commented on July 24, 2024

Gemfile.lock says 2.1.1. Not sure what I'm doing that makes the input type come out as text then. Could it be something related to the model I'm using to back the form?

from bootstrap_form.

lesleh avatar lesleh commented on July 24, 2024

Actually, crap, I was looking at the wrong view >_<. Gonna close this now.

from bootstrap_form.

potenza avatar potenza commented on July 24, 2024

😄 No worries!

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.