How we can add confirm dialog before publishing or unpublish article in Joomla ? I want to add confirmation box before publish or unpublish, I want same for custom component also, how i can achive this? Please guide


You can do this by adding the following code to the very end of your /administrator/components/com_content/views/tmpl/edit.php:

    jQuery("#jform_state").on('change', function(e){
        if (confirm("Are you sure you want to change the status of this article?") != true) {

A better idea is to copy the edit.php file to the corresponding location of your admin template and then make the modification there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.