mercredi 4 octobre 2017

How can I insert data to a table from the selected checkbox?

Hey my name is Boris,

I am trying to make a way that I can decide in what table the name and the hour goes, by selecting it from one or both checkboxes.

For example, if I have a new name and hour, I can choose whether it is going in the table of "standard" or "advanced" or both by selecting it trough the checkboxes.

#myform .plus, .minus {
  text-decoration: none;
  color: #fff;
  background-color: #fdd818;
  text-align: center;
  letter-spacing: .5px;
  -webkit-transition: .2s ease-out;
  transition: .2s ease-out;
  cursor: pointer;
}

.collapsible-header{
  color: #ffffff;
}



.row{
        margin: 0;      
        width: 100%;
}
.uren{
        display: -webkit-inline-box;
    padding-left: 10px;
    padding-right: 10px;
}
.btn {
  -webkit-border-radius: 28;
  -moz-border-radius: 28;
  border-radius: 28px;
  font-family: Arial;
  color: #ffffff;
  font-size: 20px;
  background: #ffcc00;
  padding: 5px 10px 5px 10px;
  text-decoration: none;
}
.btn:hover {
  background: #dbaf00;
  text-decoration: none;
}


/* Lets Pop up */
.letspop{
  background-color: #fff;
  width: 120px;
  display: block;
  margin: 5% auto;
  padding: 20px;
  position: relative; 
  text-align: center;
  float: right;
  margin-right: 20px;
  margin-top: 0px;
}
.letspop:hover{
  cursor: pointer;
}
.overlay{
  display: none; /* Default Hidden */
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1;
  background-color: rgba(0,0,0,0.6);
  height: 100%;
  width: 100%;
} 
.popup{
  display: none; /* Default Hidden */
  position: fixed;
  left: 50%; 
  top: 5%;
  z-index: 2;
  background-color: #fff;
  height: 450px;
  width: 300px;
  overflow: hidden;
  padding: 40px;
  transform: translate(-50%, 0);
}
#new_module{
  width: 195px;
}


/* Bored stuff & extras*/
h1, h2{
  color: steelblue ;
  font-family: sans-serif;
  text-align: center;
  text-transform: uppercase;
  line-height: 1;
}
h2{
  color: dodgerblue ;
}
small{
  color: #444 ;
  font-size:0.4em;
  display: block;
  margin: 0.2rem auto 0;
}
.close{
  position: absolute;
  top: 8px;
  right: 8px;
  display: block;
  color: #666666;
  font-family: sans-serif;
}
.close:hover{
  cursor: pointer;
  color: #444444;
}
<link href="http://ift.tt/2wfV3bp" rel="stylesheet"/>
    <form action="#" method="POST">
      <div class="row">
        <div class="input-field col s6">
          <input id="new_module" type="text" class="validate">
          <label class="active" for="new_module">Name</label>
        </div>
      </div>
      <form action="#">
        <p class="range-field">
          <input type="range" id="test" min="0" max="20" />
        </p>
      </form>
      <p>
        <input type="checkbox" class="filled-in" id="standard"/>
        <label for="standard">Standard</label>
      </p>
      <p>
        <input type="checkbox" class="filled-in" id="advanced"/>
        <label for="advanced">Advanced</label>
      </p>    
      <hr>
        <button class="btn waves-effect waves-light" type="submit" name="action">
          <i class="material-icons right">send</i>
        </button>
      <div class="close">X</div>
    </form>



Aucun commentaire:

Enregistrer un commentaire