Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- #BoxCheck{
- display: none;
- }
- #TextCanchas{
- display: none;
- }
- </style>
- <div>
- <form name="horario" action="{{route('horarios.store')}}" method="POST">
- <label>Seleccione un complejo</label>
- <br>
- <select id="complejos" name="SelectComplejos">
- <option value="">Seleccione...</option>
- @foreach($complejo as $complejo)
- <option value="{{$complejo->id}}">{{$complejo->nombre}}</option>
- @endforeach
- </select>
- @if($canchas->complejo_id == $complejo->id)
- <label>Selecciona tu cancha favorita</label
- <br>
- <input type="checkbox" name="check" id="BoxCheck">
- <label id="TextCanchas">{{$canchas->nombre}}</label>
- @endif
- <br><br>
- </form>
- </div>
- <script type="text/javascript">
- function MuestraCanchas(){
- var Canchas = document.getElementById('TextCanchas');
- var CajaCheck = document.getElementById('BoxCheck');
- if (document.horario.SelectComplejos.value == "" ) {
- Canchas.style.display = 'inline-block';
- CajaCheck.style.display = 'inline-block';
- }
- return true;
- }
- </script>
- id|nombre
- ------------
- 1|complejo1
- 2|complejo2
- 3|complejo3
- 4|complejo4
- id|nombre |complejo_id
- ---------------------------------------------
- 1|Cancha Tennis | 1
- 2|Cancha Football | 1
- 3|Cancha Basquetball | 1
- 4|Multicanchas | 2
- 5|Cancha Volleyball | 3
- 6|Cancha Hockey | 3
- 7|Cancha Golf | 4
- 8|Piscina Olimpica | 4
- opcion: Complejo1
- 'Selecciona tu cancha preferida';
- [] Cancha Tenis
- [] Cancha Football
- [] Cancha Basquetball
Add Comment
Please, Sign In to add comment