TOPIC:

Anhang und Inhalt formatieren 3 years 7 months ago #237400

  • Topic Author
  • Albatros
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 1
  • Thanks: 0
Hallo zusammen,

ich versuche gerade eine alte Anwendung in Breezing Forms abzubilden. Die Eingabefenster sind geschrieben und mit dem Submit Button wird eine Mail an die richige Adresse übertragen, angehängt ist eine .csv Datei mit den eingetragenen Inhalten.
Um diese mit meinem vorhandenen Workflow sinnvoll weiterverarbeiten zu können müsste ich den Namen der angehängten Datei manipulieren können (Abhängig von den Einträgen im Formular) und den Inhalte der gesendeten Datei auch frei definieren können. ( Also welcher Wert wird in welcher Reihenfolge in die Datei geschrieben.
Gibt es dafür irgendwo eine Anleitung (hab schon längere Zeit gestöbert und nichts gefunden) ? Kann mir jemand mit einer Newbie gerechten Anleitung helfen? Ich verwende den Quick Mode.

Vielen Dank
Holger

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

Anhang und Inhalt formatieren 3 years 7 months ago #237523

  • mihaela
  • Offline
  • User is blocked
  • User is blocked
  • Registered
  • Posts: 3128
  • Thanks: 416
Hello,

I hope that we can continue in English since we don't have a German-speaking support staff member at the moment.

The CSV attachment which is sent along with email is generated in the following file:
Joomla/components/com_breezingforms/facileforms.process.php
starting from around line 5190 to 5306.

The name of the CSV export file is generated around line 5290 with this line of ccode:
$csvname = $this->uploads . '/ffexport-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.csv';

There you can change the CSV file name to whatever suits you.
For example, if you would want to change the name to static value it would look like this:
$csvname = $this->uploads . '/WANTEDNAME-' . mt_rand(0, mt_getrandmax()) . '.csv';
You would just have to replace WANTEDNAME with the name you wish to use.

If you wish to use a value that the user filling in the form has entered in a certain field in the form (let's say name of that field is FIELDNAME), you would have to replace this line of code:
$csvname = $this->uploads . '/ffexport-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.csv';
with this code:
foreach($xmldata as $data){
            if ($data[_FF_DATA_NAME] == "field2"){ $fieldValue = $data[_FF_DATA_VALUE]; }
			}
		$csvname = $this->uploads . '/' .$fieldValue . '.csv';
You could also use the user's username in the name of CSV attachemt file similar as explained here crosstec.org/en/forums/15-usage/123352-u...achments.html#222593 .

As for the second part of your request, chaning the order of the fields in the CSV attachment and deciding which files to include will be harder to achieve. That is not a native BreezingForms feature, but if you have some coding knowledge in PHP, you can try to do so in lines from 5190 to 5306 where the "expcsv" function is defined.

This topic crosstec.org/en/forums/1-forums/125628-csv-export.html#233199 is about CSV export in Manage Records and not the CVS attachemnt which comes along with email, but it might help you achieve what you want.

P.S. Sorry for the late response, we had a lot of requests.

Let me know whether this helped.

Regards,

Mihaela

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

  • Page:
  • 1
Time to create page: 0.044 seconds

Support Chat

Join our Discord chat and enter the Crosstec channels for live-support, chat forums and interact directly with the community!

After joining, please enter the Crosstec Area and use the #crosstec-support or #crosstec-general channels.

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

Subscribe to news and updates!

Special Offer

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!

Live Support Chat Opened!

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