All threads / How do I add radio buttons to devise signup form ?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I add radio buttons to devise signup form ?

Arnas Klasauskas asked in General

I'm currently trying to add radio buttons to the devise signup form, the problem is that I dont know how I should write the migration, should it be a boolean, an integer or a string ?

The user can choose between two options, therefore I don't know how to proceed.

This is the current html code:

          <div class="row">
            <div class="col">
              <div class="form-group rounded bg-white p-2 border">
                <div class="custom-control custom-radio">
                  <input type="radio" id="course-radio-beginner-1" name="course-radio-1" class="custom-control-input">
                  <label class="custom-control-label" for="course-radio-beginner-1">Gründer</label>
                </div>
              </div>
            </div>
            <div class="col">
              <div class="form-group rounded bg-white p-2 border">
                <div class="custom-control custom-radio">
                  <input type="radio" id="course-radio-advanced-1" name="course-radio-1" class="custom-control-input">
                  <label class="custom-control-label" for="course-radio-advanced-1">Unternehmen</label>
                </div>
              </div>
            </div>
          </div>
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.