Willkommen, Gast
Angemeldet bleiben:

THEMA:

Change PDF attachement name according to field 4 Monate 1 Woche her #241076

  • Autor
  • Leni14
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Beiträge: 129
  • Dank erhalten: 0
Hi,

I used this to change my pdf's attachement name.
if($this->formrow->name=='FORMNAME'){

                    $pdfname = 'XY.pdf';
                    }
                    else{
                $pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';

But now I would need something more specific.

I would need the name of the pdf attachment to be depending on 2 selectlist value within the form.

So the selectlist value of the first selectlist would be
1;-please select-;
0;a;a
0;b;b

and the second selectlist would be
1;-please select-;
0;c;c
0;d;d

I would need the code to check which of the selecfields has a value and give it back.

So the pdf's name should be a,b,c or d.

Can someone help me with the code?

Thx,
Leni

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Change PDF attachement name according to field 4 Monate 1 Woche her #241112

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10063
  • Karma: 167
  • Dank erhalten: 800
Hi,

I took the time to build that into BF because this solution from the previous posting would be hacking and you'd need to revert back after every update.

What I did now - exclusively for pdf attachments, not exports (because these are multiple record exports) - to allow to specify the filemask right in your pdf template (the location doesn't matter, can be anywhere within the html output).

For example:
<!-- fm = {name:value}{filemask:_separator}{lastname:value}{filemask:_separator}{select:value} -->

The placeholders in curly brackets are addressing the values from the submission from the desired fields.

The basic structure is

{FIELDNAME:value}

So the above would automatically being translated into a filename like:

Mark_Wallenberg_Selection1.pdf

Since it works with dropdowns, too, you will be able to add values from several concurrent dropdowns, as well.

There are also a few system placeholders you can use:

{filemask:_separator}
{filemask:_username}
{filemask:_userid}
{filemask:_name}
{filemask:_datetime}
{filemask:_timestamp}
{filemask:_random}

Unlike the upload filemasks, you cannot specify a custom folder location. All files are backup'ed in the folder "/path/to/site/media/breezingforms/uploads/".

Please download, unzip and copy the file attached and copy it to "/components/com_breezingforms/".

If that solution is ok for you, it will be included with the next update.

Dateianhang:

Dateiname: facileform...5-21.zip
Dateigröße:60 KB


Regards,
Markus
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Letzte Änderung: Post by TheMuffinMan.

Change PDF attachement name according to field 4 Monate 9 Stunden her #241762

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10063
  • Karma: 167
  • Dank erhalten: 800
Hi,

since your yahoo account keeps blocking me (I can barely send you messages), please read the email I was trying to send you (regarding your CB list view and vertical images display problem):

Sorry, but I am not sure if I can follow.

The topic you referred to was this:
crosstec.org/en/forums/3-breezingforms-f...-updates.html#241341

There I suggested my custom file path addition to BreezingForms for PDFs:

crosstec.org/en/forums/40-club-forums-su...to-field.html#241112

But this is a completely different file than the one you just sent me.

In both cases I didn't touch the output of the list view layouts or the image scale or download plugins of contentbuilder (also not recently).

I think we need to clarify this in order to proceed.

However, regarding your list view issue where the images are displayed vertically:

This is definitely due to the report column taking space and there hasn't been any update in that regard in the recent past.
However, it is solvable as I mentioned before by adding some CSS to force fixed widths such that the images stay rendered horzontally.

I can add that for you if you want.

Regards,
Markus

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Change PDF attachement name according to field 3 Monate 2 Wochen her #242442

  • Autor
  • Leni14
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Beiträge: 129
  • Dank erhalten: 0
Hi Markus,

thank you. The file i sent to you was regarding a different topic.

I have no yahoo email and I have no problem with "CB list view and vertical images display problem" - maybe you mixed up 2 different topics?

I think I am going to send you an email with all my problems as I think there are to many forum topics now and it can be confusing now :-)

Thank you,
Leni

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Change PDF attachement name according to field 4 Wochen 14 Stunden her #247534

  • jhdesign
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Beiträge: 14
  • Dank erhalten: 0
Hi Markus,

I have applied this to some of my templates.

Client is asking for the filename to not contain the timestamp, which is added when the filename already exists, so if I use FormName, first submission goes well, second, the pdf is named FormName-Timestamp

Is there an option to not store this PDF at all and send only through email?
I understand they have to be created and placed so they can be sent on the email, can it be allowed for the filename to be overriden if exists?

I know this can be done by modifying the core file, but, looking for your input as I tried to avoid this kind of modifications where possible.

Thank you!

Juan.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Change PDF attachement name according to field 3 Wochen 6 Tage her #247576

  • TheMuffinMans Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Beiträge: 10063
  • Karma: 167
  • Dank erhalten: 800
Hi,

sure, please add this in form => advanced => more options => form pieces => before form => custom:
JFactory::getSession()->set('bfFileUploadOverride', false)

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Seite:
  • 1
  • 2
Moderatoren: ForumSupport
Ladezeit der Seite: 0.057 Sekunden

Angebot

Sommer Special! Alle Mitgliedschaften zum Sonderpreis!

Prio Support, alle Extensions und alle Templates in einem Paket.

Hier geht's zur Bestellung

Crosstec hilft sparen!

Falls Sie neu bei Crosstec sind aber bereits einen Formulargenerator bei einem anderen Hersteller gekauft haben, dann bekommen sie von uns einen Rabatt von 25% auf unsere 1-Jahres und Pro-Mitgliedschaften

Wie Sie an den Rabatt kommen?

Schreiben Sie uns einfach eine kurze Email mit beigelegten Kaufbeleg (z.B. PayPal Quittung) an sales@crosstec.org.

Wir unterstützen die Joomla Community

Crosstec unterstützt weltweit alle offiziellen Joomla! User Groups und Organisatoren von Joomla! Days die bei Joomla.org registriert sind.

Falls das auf dich zutrifft und du eines unserer Produkte brauchst, schreib uns eine kurze Email an info@crosstec.org und du bekommst eine Flatrate-Mitgliedschaft geschenkt!