Forums

Confirmation dialog on clicking checkbox

webbusteruk 29 Sep, 2019
Is there a way to have a confirmation dialog popup when clicking a checkbox?
GreyHead 30 Sep, 2019
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
webbusteruk 12 Nov, 2019
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?
This topic is locked and no more replies can be posted.