Buy Now
Sign in

Confirmation dialog on clicking checkbox

webbusteruk , September 29 2019, 22:07
W
webbusteruk 119
September 29 2019, 22:07 #389359
Is there a way to have a confirmation dialog popup when clicking a checkbox?
GreyHead 64
September 30 2019, 07:48 #389360
Hi webbusteruk,
I'm sure that you could use custom JavaScript triggered on the OnClick event of the checkbox.
If you want a more sophisticated solution there is a React add-on for the Semantic UI library which has this feature - see here.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
W
webbusteruk 119
November 12 2019, 12:51 #389968
On a related note, we are trying to put a confirmation dialog popup when clicking on a Task Button with ajax (ie delete button, which when clicked removes a row from the table).
<script>
jQuery('.trash_note').click(function() {
if( !confirm('Are you sure you want to move this note to the recycle bin?')) {
return false;
} else {
}
});
</script>
Using Javascript OnClick, the confirmation dialog comes up but even if you click cancel, the ajax still executes (same issue with the checkbox). Is there way to stop the Ajax from executing if we click cancel on the confirmation dialog?
Tried looking into React JS but not sure how that fits in with CCv6's Task Buttons?