Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

475
Vistas
Laravel Collective Form checkbox always checked

I'm using Laravel Collective for Forms and having an issue with checkbox.

Here is what I'm doing :

{!! Form::checkbox('independent',null,['class'=>'form-control', 'required' => 'required'])!!}

I've tried changing values for "null", added one more parameters as suggested by many while googling for solution but nothing seems to be working.

If anyone know the solution or having same issue, please share.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The documentation states that the third parameter is a boolean that determines if the checkbox is checked, you have an array as the third parameter. Php interprets an array as true, this is why your checkbox is always checked.

You should add true or false as the third parameter and add the options array as a fourth parameter. This can be found in the source code on GitHub.

{!! Form::checkbox('independent', null, false) !!}
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda