TOPIC:

PDF Attachment File name 5 months 2 days ago #268527

  • tihana.krivic's Avatar
  • tihana.krivic
  • Online
  • Moderator
  • Moderator
  • Posts: 10501
  • Karma: 3
  • Thanks: 702
Hi,

I hope we can continue in English :)

You can use this for your form, just replace formname with name of your form in which you want to achive this (not title), and that is it :)

Regards,
Tihana
The following user(s) said Thank You: CaroZumi

Please Log in or Create an account to join the conversation.

PDF Attachment File name 5 months 1 day ago #268618

  • CaroZumi
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 7
  • Thanks: 0
Thank you for the answer, yes that's what I did. But my question was if I have multiple forms (form1, form2, form3) how do I enter the code?


$yourname="Brotbestellung";
if($this->formrow->name=='form1'){

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

$yourname="Fleischbestellung";
if($this->formrow->name=='form2'){

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

$yourname="Gemüsebestellung";
if($this->formrow->name=='form3'){

$pdfname = $ff_compath . '/exports/'.$yourname.'.pdf';
}
else{
$pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
}
Would that be correct as inserted above?
Thank you.

Please Log in or Create an account to join the conversation.

PDF Attachment File name 5 months 1 day ago #268626

  • tihana.krivic's Avatar
  • tihana.krivic
  • Online
  • Moderator
  • Moderator
  • Posts: 10501
  • Karma: 3
  • Thanks: 702
Hi,

the code looks ok, please test it like this, and let me know the result

Regards,
Tihana

Please Log in or Create an account to join the conversation.

PDF Attachment File name 5 months 1 day ago #268650

  • CaroZumi
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 7
  • Thanks: 0
I tried it now with two forms, unfortunately it ignores with the first form and changes only the file name with the 2. syntax (Fondue):
//***neu eingefügt für das Brotformular

            $yourname="Brotbestellung";
if($this->formrow->name=='Brot'){

                    $pdfname = $ff_compath . '/exports/'.$yourname.'.pdf';
                    }
                    else{
                $pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
            } 
			// und hier  für Fonduebestellung
			
			 $yourname="Fondue Bestellung";
if($this->formrow->name=='Fondue'){

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

Where is the mistake?

Please Log in or Create an account to join the conversation.

PDF Attachment File name 5 months 1 day ago #268651

  • tihana.krivic's Avatar
  • tihana.krivic
  • Online
  • Moderator
  • Moderator
  • Posts: 10501
  • Karma: 3
  • Thanks: 702
Hi,

the code looks ok, but it seems this works only with one forms. You tested it already with only one forms?

I will see what I can do with this, and come back to you

Regards,
Tihana

Please Log in or Create an account to join the conversation.

PDF Attachment File name 5 months 1 day ago #268652

  • tihana.krivic's Avatar
  • tihana.krivic
  • Online
  • Moderator
  • Moderator
  • Posts: 10501
  • Karma: 3
  • Thanks: 702
Hi again,

please try like this:
$yourname="Brotbestellung";
if($this->formrow->name=='form1'){

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

$yourname1="Fleischbestellung";
if($this->formrow->name=='form2'){

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

$yourname2="Gemüsebestellung";
if($this->formrow->name=='form3'){

$pdfname = $ff_compath . '/exports/'.$yourname2.'.pdf';
}
else{
$pdfname = $ff_compath . '/exports/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
}
Please replace form1, form2, form3 with name of your forms for form1, form2,form3 (not title)

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.051 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!