I have a fullcalendar and clicking on some day will show me a form, the user enters the normal data and must select some people assigned to that event with a checkbox. ( There everything is fine ).
Calendar image with events already created
Image of the registration form
The user clicking on an already created event will show the records that he has already entered and which is already stored in the database:
Image of the form with the data that the user already registered
Image of the sample of the database, and the assigned field
Jquery code where it shows the information of the events in the inputs:
eventClick:function(calEvent,jsEvent,view){
$('#btnAgregar').prop("hidden",true);
$('#btnModificar').prop("hidden",false);
$('#btnFinalizado').prop("hidden",false);
//Mostrar la información del evento en los inputs
FechaHoraCorreo= calEvent.correo.split(" ");
$('#txtFechaCorreo').val(FechaHoraCorreo[0]);
$("#txtHoraCorreo").val(FechaHoraCorreo[1]);
FechaHoraInicio= calEvent.inicio.split(" ");
$('#txtFechaInicio').val(FechaHoraInicio[0]);
$("#txtHoraInicio").val(FechaHoraInicio[1]);
FechaHoraFin= calEvent.fin.split(" ");
$('#txtFechaFin').val(FechaHoraFin[0]);
$("#txtHoraFin").val(FechaHoraFin[1]);
FechaHoraEntrega= calEvent.entrega.split(" ");
$('#txtFechaEntrega').val(FechaHoraEntrega[0]);
$("#txtHoraEntrega").val(FechaHoraEntrega[1]);
$('#txtIdCumplimiento').val(calEvent.idcumplimiento);
$('#txtTrabajo').val(calEvent.trabajo);
$('#txtIdEjecucion').val(calEvent.idejecucion);
$('#txtPm').val(calEvent.pm);
$('#txtComercial').val(calEvent.comercial);
$('#txtIdMes').val(calEvent.idmes);
$("#ModalEventos").modal();
}
What do I do so that when the user clicks on an event already created, I show the checkboxes already checked according to what the user checked when they registered?
If, for example, you click on Event 1, check out Erick Gaming, or if you click on event 2, show me Andres Medina and Nelson Barrios and so on with the other events that you are creating.