Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Is there a way to select multiple buttons in a single form? #66

Open
sikapoor opened this issue Jun 24, 2020 · 0 comments
Open

Is there a way to select multiple buttons in a single form? #66

sikapoor opened this issue Jun 24, 2020 · 0 comments

Comments

@sikapoor
Copy link

sikapoor commented Jun 24, 2020

I know that I can select multiple checkboxes in a form but how do I select multiple buttons that change their state (color) after the click in a single form? Is there a JavaScript component I need to look into along with the custom-forms package? I've included the block of code I'm using to build these buttons. Thanks in advance!

`

  <div class = "p-5">
    <button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
      <div class = "text-left text-black font-bold">
        Option1
      </div>
    </button>
  </div>

  <div class = "p-5">
    <button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
      <div class = "text-left text-black font-bold">
        Option2
      </div>
    </button>
  </div>

  <div class = "p-5">
    <button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
      <div class = "text-left text-black font-bold">
        Option3
      </div>
    </button>
  </div>
  
    <div class = "p-5">
        <button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
        <div class = "text-left text-black font-bold">
            Option4
        </div>
        </button>
    </div>

<div class = "p-5">
    <button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
      <div class = "text-left text-black font-bold">
        Option5
      </div>
    </button>
</div>
`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant