Possible cause / fault
OK, I've spent some time digging on this and have found that the DA Multiple Records (Insert, Delete, Update) seems to act strangely at my end. The Repeat Selection behavior inserted by the wizards seems to appear randomly and also to rename my designated button adding an incremented number - hence not action when the button is pressed.
Below I've copied the chunks of code generated by the wizards followed by the hand edited code that corrects the anomaly and which subsequently works as required.
Is this an error with my set-up (DW8, DA 2.0.6) or a bug?
Please advise soonest.
Wizard generated code:
<form id="del_MultiplesForm" name="del_MultiplesForm" method="post" action="">
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_rsCart2Printer){
?>
<table width="300">
<?php do { ?>
<tr>
<td><?php echo $row_rsCart2Printer['printerName']; ?></td>
<td><input type="hidden" name="WADA_RepeatID_cart2PrinterID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_cart2PrinterID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsCart2Printer["cart2PrinterID"]; ?>" />
<input type="checkbox" name="btn_DelMultiCheck_<?php echo $RepeatSelectionCounter_1; ?>" id="btn_DelMultiCheck_<?php echo $RepeatSelectionCounter_1; ?>" value='<?php echo $row_rsCart2Printer["cart2PrinterID"]; ?>'/></td>
</tr>
<?php } while ($row_rsCart2Printer = mysql_fetch_assoc($rsCart2Printer)); ?>
<tr>
<td><input type="submit" name="btn_DeleteMultiples_<?php echo $RepeatSelectionCounter_1; ?>" id="btn_DeleteMultiples_<?php echo $RepeatSelectionCounter_1; ?>" value="Delete Selected" /></td>
<td> </td>
</tr>
</table>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<td>No records match your request.</td>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_rsCart2Printer && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_rsCart2Printer = mysql_fetch_assoc($rsCart2Printer);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</form>
Hand edited / corrected code:
(Note the position of the RepeatSelectionCounter code and the name o the submit button - btn_DelMultiples)
<form id="del_MultiplesForm" name="del_MultiplesForm" method="post" action="">
<table width="300" class="dataTable">
<?php do { ?>
<tr>
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_rsCart2Printer){
?>
<th><?php echo $row_rsCart2Printer['printerName']; ?></th>
<td><input type="hidden" name="WADA_RepeatID_cart2PrinterID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_cart2PrinterID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsCart2Printer["cart2PrinterID"]; ?>" />
<input type="checkbox" name="btn_DelMultiCheck_<?php echo $RepeatSelectionCounter_1; ?>" id="btn_DelMultiCheck_<?php echo $RepeatSelectionCounter_1; ?>" value='<?php echo $row_rsCart2Printer["cart2PrinterID"]; ?>'/></td>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<td>No records match your request.</td>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_rsCart2Printer && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_rsCart2Printer = mysql_fetch_assoc($rsCart2Printer);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</tr>
<?php } while ($row_rsCart2Printer = mysql_fetch_assoc($rsCart2Printer)); ?>
<tr>
<td><input type="submit" name="btn_DelMultiples" id="btn_DelMultiples" value="Delete Selected" /></td>
<td> </td>
</tr>
</table>
</form>