Coder Social home page Coder Social logo

bulma_form_builder's Introduction

bulma_form_builder

bulma_form_builder is a Rails form builder that makes it super easy to integrate Bulma style forms into your Rails application.

Installation

Add this line to your application's Gemfile:

gem 'bulma_form_builder'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bulma_form_builder

Usage

To get started, use the bulma_form_with helper in place of the Rails form_with helper. Here's an example:

<%= bulma_form_with(model: @user, local: true) do |f| %>
  <%= f.email_field :email %>
  <%= f.password_field :password %>
  <%= f.check_box :remember_me %>
  <%= f.submit "Log In" %>
<% end %>

This generates the following HTML:

<form action="/user" accept-charset="UTF-8" method="post">
  <div class="field">
    <label class="label" for="user_email">Email</label>
    <div class="control">
      <input class="input" type="email" name="user[email]" id="user_email" />
    </div>
  </div>
  <div class="field">
    <label class="label" for="user_password">Password</label>
    <div class="control">
      <input class="input" type="password" name="user[password]" id="user_password" />
    </div>
  </div>
  <div class="field">
    <label class="checkbox">
      <input name="user[remember_me]" type="hidden" value="0" />
      <input type="checkbox" value="1" name="user[remember_me]" id="user_remember_me" />
      <span class="control-label">Remember me</span>
    </label>
  </div>
  <input type="submit" name="commit" value="login" data-disable-with="login" />
</form>

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/aki77/bulma_form_builder. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

bulma_form_builder's People

Contributors

aki77 avatar dependabot[bot] avatar lipedjow avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lipedjow jrmhaig

bulma_form_builder's Issues

Join efforts on bulma form builder gems

Hi there,

I pictured there are three efforts to implement a Bulma Form Builder as gem for rails.

I noticed when I wanted to publish my gem but realized the name is already taken. Although my approach is the oldest, it is probably also the dirtiest and feature-poorest of the three. Otoh I think it is easiest to comprehend (there is no high level abstractions, as in the other two).

I am not planning to make "my" BulmaFormBuilder a thing, I need it specifically for side projects. I will not be able to throw a big amount of (mostly unpaid) time at it and also cannot provide future support. However, I'd like to reach out to @storkvist and @aki77 because I think a conversation might be fun and interesting and maybe we could share some parts (e.g. proper demo app).

I will create this issue in all three projects until we connected.

Thanks for your contributions!

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.