You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often have a number of submit buttons that call the same page which then reads for their POST variable names to determine the right action to take. For example I'm trying to use this on a page where two options are:
form action='/pageref.php' method='post'>
input name="delete" type="submit" class="button small expand alert" value="Delete all data!" data-confirm/>
input name="download" type="submit" class="button small expand success" value="Download all data as CSV">
/form>
pageref.php checks for these with:
if (isset($_POST['delete])) {
...
}
if (isset($_POST['download])) {
...
}
The trouble I'm having is that inserting the data-confirm gives the expected modal dialogue box but when pageref is called the $_POST['delete'] has been lost so I can't confirm the button was pressed. It's become a bit too safe!
Am I missing something obvious or is this a limitation - I could call a different page with this button as a workaround and after performing the action set the headers to the page I want it to go to I suppose.
PS If I use data-value="Do you really want to do this?" so that it uses the window dialogue then the POST variables are set correctly
The text was updated successfully, but these errors were encountered:
Hi, great plugin - works so easily.
I often have a number of submit buttons that call the same page which then reads for their POST variable names to determine the right action to take. For example I'm trying to use this on a page where two options are:
form action='/pageref.php' method='post'>
input name="delete" type="submit" class="button small expand alert" value="Delete all data!" data-confirm/>
input name="download" type="submit" class="button small expand success" value="Download all data as CSV">
/form>
pageref.php checks for these with:
if (isset($_POST['delete])) {
...
}
if (isset($_POST['download])) {
...
}
The trouble I'm having is that inserting the data-confirm gives the expected modal dialogue box but when pageref is called the $_POST['delete'] has been lost so I can't confirm the button was pressed. It's become a bit too safe!
Am I missing something obvious or is this a limitation - I could call a different page with this button as a workaround and after performing the action set the headers to the page I want it to go to I suppose.
PS If I use data-value="Do you really want to do this?" so that it uses the window dialogue then the POST variables are set correctly
The text was updated successfully, but these errors were encountered: