The only way to handle this without page reloading is to use some form of javascript like angular or jquery or something like that.
for page reload just check for it to be enabled/checked using something like this
@if( Input::get('material', false))
... show something here ...
@endif
with jquery you can use something like this keep in mind with this option you'll need to validate that the checkbox is checked in the backend before saving those values to the database.
<script>
$(function(){
//listen for checkbox clicked, works for check and uncheck
$("#material").click(function(){
//get if checked, which returns a boolean value
var formElementVisible = $(this).is(":checked");
//show if checked
if ( formElementVisible ){
$(".elementToShowOrHide").show( );
return true;
}
//hide if unchecked
$(".elementToShowOrHide").hide( );
});
});
</script>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community