Entrar | Registrar | FAQ

How to create a form with checkboxes/hoverable dropdown

+ Postar uma resposta

2 Mensagens Página 1 de 1

How to create a form with checkboxes/hoverable dropdown

por raymond_55 » Qui Jul 06, 2017 3:56 pm

Hi. I also psoted this question here: https://stackoverflow.com/questions/44912472/how-to-create-a-form-with-checkboxes-and-a-hoverable-dropdown-menu-to-chose-acti

I would like to implement the following. A table with a checkbox in a cell for every row. To submit the form a dropdown menu offers the different actions to take (move, delete, etc).

It would look like:

The submit button would be a hoverable dropdown with different actions:

The working code for the table:
Código: Selecionar tudo
    <form action="/action_page.php" method="get">
       <input type="submit" value="Submit">      
         @foreach ($tags as $tag)
               <input type="checkbox" name={{$tag->title}} value="true"><br>

source: https://www.w3schools.com/tags/att_input_checked.asp

Potential code for the hoverable menu:
Código: Selecionar tudo
    <div class="dropdown">
      <button class="dropbtn">Dropdown</button>
      <div class="dropdown-content">
        <a href="#">Link 1</a>
        <a href="#">Link 2</a>
        <a href="#">Link 3</a>

source: https://www.w3schools.com/howto/howto_css_dropdown.asp

How could this be achieved? A form has only one action for the button and how to make the submit button into a hoverable dropdown?

Thank you.
Avatar de usuário


  • Mensagens: 1
  • Data de registro: Qui Jul 06, 2017 3:47 pm

Re: How to create a form with checkboxes/hoverable dropdown

por frickarolos » Sex Ago 25, 2017 10:49 am

Use an input field with type="checkbox"
Or use this form generator http://html-css-js.com/html/generator/form/
Find some examples here http://html-css-js.com/html/tags/#input
Avatar de usuário


  • Mensagens: 2
  • Data de registro: Sex Ago 25, 2017 10:43 am

+ Postar uma resposta

Página 1 de 1