Note that there are some explanatory texts on larger screens.

plurals
  1. POCakePHP confirmation popup not appearing
    text
    copied!<p>When a user clicks a submit button a popup should appear asking them if they wish to submit the selection. I've been adding to the view, and I just noticed that although the form works properly, I no longer receive a popup asking to confirm the selection. </p> <p>This consists of two tables. An upper one to display info where each row has a checkbox. The bottom table allows you to choose if you want to submit only selected checkboxes, or all of the rows in the table.</p> <pre><code>&lt;table&gt; &lt;? echo $this-&gt;Form-&gt;create(null,array( 'onsubmit'=&gt;'return confirm("Are you sure you want to archive?')); ?&gt; &lt;th&gt;Order ID&lt;/th&gt;&lt;th&gt;Order Date&lt;/th&gt;&lt;th&gt;Order Total&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;th&gt;View&lt;/th&gt;&lt;th&gt;Select to Archive&lt;/th&gt; &lt;?php foreach ($orders as $order): ?&gt; &lt;tr&gt; &lt;td&gt;&lt;?php echo $order['Order']['id'];?&gt; &lt;/td&gt; &lt;td&gt;&lt;?php echo $order['Order']['date']; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $order['Order']['total'];?&gt; &lt;/td&gt; &lt;td&gt;&lt;?php echo $order['Order']['order_status'];?&gt; &lt;/td&gt; &lt;td&gt;&lt;a href="/orders/details/&lt;?php echo $order['Order']['id']; ?&gt;"/&gt;View Order&lt;/a&gt; &lt;/td&gt; &lt;td&gt;&lt;? echo $this-&gt;Form-&gt;checkbox('archive_value.', array('hiddenField' =&gt; false, 'value' =&gt; $order['Order']['id'])); ?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php endforeach; ?&gt; &lt;/table&gt; &lt;table class = "table_order_status"&gt; &lt;tr&gt; &lt;td width="350"&gt; &lt;? echo $this-&gt;Form-&gt;input('archive_values', array('options' =&gt; $archive_options, 'value' =&gt; $select_value, 'name' =&gt; 'archive')); ?&gt; &lt;/td&gt; &lt;td&gt; &lt;? echo $this-&gt;Form-&gt;end(__('Submit')); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload