TEMA:

File upload: rewrite existing image 5 años 9 meses antes #195001

  • Avatar de Tihomir
  • Tihomir
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Registered
  • Mensajes: 3564
  • Gracias recibidas: 289
Hi,

do you want to replace an existing img with the new one , that's what are you trying to achieve?

Kind regards
Tihomir
===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Regards
Tihomir
==========================================
+++ Purchase Professional Support: crosstec.org/en/support/purchase-additional-support.html +++

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

File upload: rewrite existing image 5 años 9 meses antes #195004

  • Avatar de alexxbob Autor del tema
  • alexxbob
  • Fuera de línea
  • Navegador Iniciado
  • Navegador Iniciado
  • Registered
  • Mensajes: 19
  • Gracias recibidas: 1
Hi,

Yes, i just want to replace an existing image, after a new image is selected/uploaded.

Thank you.

Kind regards,

Alex

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

File upload: rewrite existing image 5 años 9 meses antes #195192

  • Avatar de Tihomir
  • Tihomir
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Registered
  • Mensajes: 3564
  • Gracias recibidas: 289
Hi,

sry to keep you waiting. I finally found out an alternative way how to achieve that.

Go to your form > advanced > more options > scripts > Initialization Script > click on the custom radio button , and put the following code there :
function ff_FormName_init() {

    jQuery("#bfSubmitButton").click(function () {

        if (JQuery('.bfFlashFileQueueClass').html() != '') {

            JQuery('[name^="cb_delete"]').prop('checked', true);

        }

    });

}

Just make sure to change FormName of the main function to the name of your form.

Try to test this solution and let me know how it went.

I'm waiting for your feedback.

Kind regards
Tihomir
===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Regards
Tihomir
==========================================
+++ Purchase Professional Support: crosstec.org/en/support/purchase-additional-support.html +++

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

File upload: rewrite existing image 5 años 9 meses antes #195196

  • Avatar de alexxbob Autor del tema
  • alexxbob
  • Fuera de línea
  • Navegador Iniciado
  • Navegador Iniciado
  • Registered
  • Mensajes: 19
  • Gracias recibidas: 1
Hi Tihomir,

I have just one word for you – Perfect!

Thank you very much for this solution and for your time, this is exactly what I wanted to have. You just made my day.

Keep up the good work guys!

Kind regards,

Alex

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

File upload: rewrite existing image 5 años 9 meses antes #195201

  • Avatar de Tihomir
  • Tihomir
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Registered
  • Mensajes: 3564
  • Gracias recibidas: 289
Great :-),

thank you for your kind words :-).

Let me know if you need further assistance.

Kind regards
Tihomir
===============================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
===============================================
Regards
Tihomir
==========================================
+++ Purchase Professional Support: crosstec.org/en/support/purchase-additional-support.html +++

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Última Edición: Post by Tihomir.

File upload: rewrite existing image 2 meses 2 semanas antes #278857

  • Tohm
  • Fuera de línea
  • Navegador Junior
  • Navegador Junior
  • Registered
  • Mensajes: 42
  • Gracias recibidas: 0
Hi I know it has been a while since last message but I need to delete only the image wich is replaced.

If you have several image upload fields, your script is good but it removes all existing images instead of just deleting the one which has to be removed.

Do you know how to do just to remove the image just next to the new one?
The only [name^="cb_delete"] which is after the .bfFlashFileQueueClass and not all of them

I hope i'm clear enough as my english is not so good

Regards

Thomas

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

  • Página:
  • 1
  • 2
  • 3
Moderadores: ForumSupport
Tiempo de carga de la página: 0.063 segundos

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!