Jump to content


callback_after_upload : get name of the field clicked

callback_after_upload field clicked

  • Please log in to reply
2 replies to this topic

#1 Pablo Uribe

Pablo Uribe

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 July 2016 - 05:53 AM

HI MASTERS, please help

 

one table have 2 columns : A and B

 

both save files 

 

$crud->set_field_upload('A', 'public/uploads/files');
$crud->set_field_upload('B', 'public/uploads/files');
 
 
$crud->callback_after_upload(array($this, '_callback_upload')); is fired when i pick one file.
 
i need to know what field is firing the callback, because i need to apply several validations depending if it A or B
 
THANK YOU VERY MUCH 
 

 



#2 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 07 July 2016 - 06:16 AM

Hi Pablo,

 

If you look into the background process, what you will notice is value of the field being populated .. thats coming in. Waht you can do in i - look@the actual name of the file and value in the field .. see which one is same - that is probably the file being uploaded. Now only issue in this case is - if the user is trying to upload same file for both the fields - it may be causing the problem / issue. But thats just - rare condition / situation.

 

Till then, hope this technique helps you look in helping reach your solution you looking into.

 

Happy Gcing..



#3 Pablo Uribe

Pablo Uribe

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 July 2016 - 03:10 PM

thank you, the problem was solved !!

 

 







Also tagged with one or more of these keywords: callback_after_upload, field clicked

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users