• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.