Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
HTML Checkbox cannot be checked

I have some checkbox in a table that contains the id of that row item. I want to allow the user to select multiple rows. However, I can't seem to check the checkbox on Chrome. I loaded the site up on my mobile and it works. I have tried to insert an onclick but it doesn't seem like the checkbox is registering any clicks to it as well. Please help.

The table

<?php echo form_open_multipart('Events/Two/Search');?>
<table class="table">
            <thead>
                <tr class="text-left">
                    <td></td>
                    <td>Name</td>
                    <td>Email</td>
                    <td>Phone Number</td>
                    <td>Address</td>
                </tr>
            </thead>
            <tbody>
                <?php 
                    if(!empty($datatable)){
                        foreach ($datatable as $data){
                ?>
                    <tr>
                        <td><input type="checkbox" name="id[]" value="<?php echo $data->id; ?>"/></td>
                        <td><?php echo $data->first_name." ".$data->last_name; ?></td>
                        <td><?php echo $data->email; ?></td>
                        <td><?php echo $data->phone_number; ?></td>
                        <td><?php echo $data->address;?></td>
                    </tr>
                <?php 
                    }
                }
                ?>
            </tbody>
        </table>
<?php echo form_close(); ?>

EDIT: I have cleared my cache and cookies as well. It works on the mobile but not on chrome for some reason.

EDIT 2 : It works on Safari

EDIT 3 : If I place a checkbox on another place, I can check it. Just not in the table

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

<tbody>
                <?php 
                    if(!empty($datatable)){
                        foreach ($datatable->result() as $data){
                ?>
                    <tr>
                        <td><input type="checkbox" name="id[]" value="<?php echo $data->id; ?>"/></td>
                        <td><?php echo $data->first_name." ".$data->last_name; ?></td>
                        <td><?php echo $data->email; ?></td>
                        <td><?php echo $data->phone_number; ?></td>
                        <td><?php echo $data->address;?></td>
                    </tr>
                <?php 
                    }
                }
                ?>
            </tbody>
        </table>

First Your query is not working it seems so please preview this code the use jquery append to add more row if you need help on that code will be below

Jquery on click ADD/REMOVE ROW please Visit the link below https://jsfiddle.net/susanadhikary/omngzss8/8/

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda