0

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 Sep 5 '12 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 Sep 6 '12 at 11:50
0

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');
drupal_add_js('jQuery(document).ready(function(){
jQuery("#clicky").live("click", function(){
jQuery("#dialog").dialog({ modal: true ,height: 250,width: 350,
buttons: [
{
text: "Cancel",
click: function() {
jQuery(this).dialog("close");
}},
{
text: "Submit",
click: function() {
jQuery("#dialog-form").submit();
}}
]});});});', 'inline');

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.