Welcome Guest, Not a member yet? Register   Sign In
enable/disable submit button based on my row table value
#2

If i were you, i would definitely handle this in the function that is drawing the table.


Something like this:
PHP Code:
   <tbody>
 
       <?php foreach ($dataArray as $row): ?>
            <tr>
                <td><?= $row[0?></td>
                <td><?= $row[1?></td>
                <td><?= $row[2?></td>
                <td><?= $row[3?></td>
                <td>
                    <?php if ($row[3] == 'failure'): ?>
                        <button class="disabled"  disabled >Push Button</button>
                    <?php else: ?>
                        <button class="active" >Push Button</button>
                    <?php endif; ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </tbody> 
Reply


Messages In This Thread
RE: enable/disable submit button based on my row table value - by qury - 10-05-2018, 04:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB