Bienvenido, Invitado
Recordarme

TEMA:

Problems with attachment names 8 meses 1 semana antes #271547

  • Avatar de sciencemkt Autor del tema
  • sciencemkt
  • Fuera de línea
  • Expert Breezer
  • Expert Breezer
  • Science applied to marketing
  • Mensajes: 306
  • Gracias recibidas: 0
Hi Tihana:

Don't worry, the weekend is for rest and you deserve it for your good work in general.

Best regards.
Alejandro Cobo
Neuromarketing Company

=============================================

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

Problems with attachment names 8 meses 1 semana antes #271558

  • Avatar de tihana.krivic
  • tihana.krivic
  • Ausente
  • Moderator
  • Moderator
  • Mensajes: 11763
  • Karma: 3
  • Gracias recibidas: 761
Hi,

ok, I tested it.

In line 5381 was the code by default:
$pdfname = $this->uploads . '/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
instead of this I added this code:
$yourname="A PFY document";
            if($this->formrow->name=='test213'){
			$pdfname = $ff_compath . '/exports/'.$yourname.'.pdf';
                    }
                    else{
                $pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
            }
For me it works well, I tested it multiple times and always pdf had the same name without any numbers

Regards,
Tihana

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

Problems with attachment names 8 meses 1 semana antes #271567

  • Avatar de sciencemkt Autor del tema
  • sciencemkt
  • Fuera de línea
  • Expert Breezer
  • Expert Breezer
  • Science applied to marketing
  • Mensajes: 306
  • Gracias recibidas: 0
Hi Tihana:

Thanks for your support.

I'm doing it as you say and it doesn't work. I'm attaching an image of how the PDFs arrive and how the code is in the file.





The code is this:
        }else{

            /*$pdfname = $this->uploads . '/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';*/
			$yourname="form_oportunidades";
            if($this->formrow->name=='test213'){
			$pdfname = $ff_compath . '/exports/'.$yourname.'.pdf';
                    }
                    else{
                $pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
            }
        }

Surely there is something I'm doing wrong.

Best regards.
Alejandro Cobo
Neuromarketing Company

=============================================

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

Problems with attachment names 8 meses 1 semana antes #271570

  • Avatar de tihana.krivic
  • tihana.krivic
  • Ausente
  • Moderator
  • Moderator
  • Mensajes: 11763
  • Karma: 3
  • Gracias recibidas: 761
Hi,

in this part of code:
$yourname="form_oportunidades";
this shouldn't be form name, this should be name of your wantend pdf name

In this part of code:
if($this->formrow->name=='test213'){
test213 is name of your form (not title)

Regards,
Tihana

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

Problems with attachment names 8 meses 1 semana antes #271572

  • Avatar de sciencemkt Autor del tema
  • sciencemkt
  • Fuera de línea
  • Expert Breezer
  • Expert Breezer
  • Science applied to marketing
  • Mensajes: 306
  • Gracias recibidas: 0
Hello:

I really do, but I don't know why it doesn't come out.
$yourname="cv-localizalia";
            if($this->formrow->name=='form_oportunidades'){
			$pdfname = $ff_compath . '/exports/'.$yourname.'.pdf';
                    }
                    else{
                $pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
            }

- cv-localizalia: name of the pdf.
- form_oportunidades: name of the form.

Sorry if I'm not doing it right.

Best regards.
Alejandro Cobo
Neuromarketing Company

=============================================

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

Última Edición: Post by sciencemkt.

Problems with attachment names 8 meses 1 semana antes #271575

  • Avatar de tihana.krivic
  • tihana.krivic
  • Ausente
  • Moderator
  • Moderator
  • Mensajes: 11763
  • Karma: 3
  • Gracias recibidas: 761
Hi,

now the code looks ok.

Could you please enable pdf as attachemnt in admin emails and then check if it comes in right way? (this is for test)

Regards,
Tihana

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

Tiempo de carga de la página: 0.058 segundos