Can We write function for remove button as I want to display Captcha in popup on Remove button for security reason.

same type of some function like used in below post.

How can I automatically upload images on file selection rather than pressing the upload button?

  • I have search into file.js file in core modules but what happens if i add any confirmation alert on it, ajax is response first than javascript calls. I do not underspend how to start..
    – Drupalrk
    Commented Sep 5, 2012 at 5:46
  • can I use Drupal.ajax.prototype.beforeSubmit function for manage_file form element events??? means can we use ajax.beforeSubmit for remove button events as i have search alot and do not get any solution.. please help me out...
    – Drupalrk
    Commented Sep 6, 2012 at 11:50

1 Answer 1


I have solved it. I have hide remove button access. and then put my own remove button, and open dialog box in form to display popup box.

enter image description here

please see code.

drupal_add_library('system', 'ui.dialog');
jQuery("#clicky").live("click", function(){
jQuery("#dialog").dialog({ modal: true ,height: 250,width: 350,
buttons: [
text: "Cancel",
click: function() {
text: "Submit",
click: function() {
]});});});', 'inline');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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