TOPIC:

Re:Custom email noHanstifications howto 11 years 10 months ago #2205

  • moriwenne
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 23
  • Karma: 5
  • Thanks: 1
Alrighty Hans. So, you're using the RM_ContactForm.html.php as your html file.
Looking at your code it looks fine, meaning, the default html file with give you all the data horizontally but yours will not, you have the <br /> in it so it should be creating newlines.
What you're probably getting is the formtitle, browser, provider, etc in new lines but the data itself isn't?
Is that it?
I can see from your code that you have no new lines in the data part that would be


<?php foreach ($MAILDATA as $DATA): ?> <?=$DATA[_FF_DATA_TITLE]?>: <?=$DATA[_FF_DATA_VALUE]?><?=$NL ?> <?php endforeach; ?>

That will create all the data in your email, TITLE: VALUE, so you need a <br /> after the value like this
<?=$DATA[_FF_DATA_TITLE]?>: <?=$DATA[_FF_DATA_VALUE]?><br /><?=$NL ?> <?php endforeach; ?>

Now, what you should effectively do is take away all the <?=$NL ?> and transform them into <br />.
But since your building html here you could be making some nice tables and all with it, you already have some nice paragraphs and bolds :)

Anyway, that's surely it, the <br /> after the data, tell me if it fixes it.

Mori

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

Re:Custom email noHanstifications howto 11 years 10 months ago #2207

  • Hans
  • Visitor
  • Visitor
Mori,

It worked!

Replacing
<?=$NL ?>
with
<br />
did the job in putting it into new lines.

2 additional remarks

1. textarea in html version shows the text next to each other.
in the txt version when you enter several lines into the text area, the output is like you entered it, which is better of course.

Is there a way to change such behaviour in an html layout?

2. is there a trick to change mail subject to something else, for example the form name...

Thanks for your help so far, you have been more then helpful!

I hope someone else can benefit it, I'll show my nem code for informational purposes...

RM_ContactForm.html.php
<?php
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
?>

<p><b>Contact</b><br />
Verzonden op: <?=$SUBMITTED ?><br />
<br />
</p>
<p><?php foreach ($MAILDATA as $DATA): ?>
<b><?=$DATA[_FF_DATA_TITLE]?>:</b> <?=$DATA[_FF_DATA_VALUE]?><br />
<?php endforeach; ?>
</p>

<p>
<b>Extra informatie:</b>
<br />
<?=$PROCESS_FORMTITLE ?>: <?=$TITLE ?><br />
<?=$PROCESS_SUBMITTEDAT ?>: <?=$SUBMITTED ?><br />
<?=$PROCESS_SUBMITTERIP ?>: <?=$IP ?><br />
<?=$PROCESS_PROVIDER ?>: <?=$PROVIDER ?><br />
<?=$PROCESS_BROWSER ?>: <?=$BROWSER ?><br />
<?=$PROCESS_OPSYS ?>: <?=$OPSYS ?>
</p>

<p>
<?php if ($RECORD_ID != ''): ?>
<?=$PROCESS_RECORDSAVEDID?> <?=$RECORD_ID ?>
<?php endif; ?>
</p>

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

Re:Custom email noHanstifications howto 11 years 10 months ago #2210

  • Moriwenne
  • Visitor
  • Visitor
Hey Hans

1. textarea in html version shows the text next to each other.
in the txt version when you enter several lines into the text area, the output is like you entered it, which is better of course.

Is there a way to change such behaviour in an html layout?

This happens exactly because of html. The file is interpreted like it is an html page. Html pages don't care about your hitting enter or space multiple times, only the <br /> creates a new line and only   creates a space. If you want to tweak it to your liking you should check some tutorials on html and use tables, with borders, without borders, to have the final appearance that you desire.


2. is there a trick to change mail subject to something else, for example the form name...


Yes there is. You have to go to the place where the subject is created.

Go to components\com_facileforms\facileforms.process.php

Open the file and go down to line 2947 (or do a find), to get to the function sendEmailNotification()

Inside that function you have the following line

$subject = BFText::_('PROCESS_FORMRECRECEIVED');

You need to substitute that line for

$subject = $this->formrow->title;

and you'll get the title of your form send as the subject of your email.

Good luck

Mori

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

Re:Custom email noHanstifications howto 11 years 10 months ago #2215

  • Hans
  • Visitor
  • Visitor
Thanks Mori.

1. concerning my quest replacing the line breaks in textarea with <br>

Found several solutions
PHP comes down to this
$fldtextArea_name = str_replace("<br>", "\n", $fldtextArea_name);
or
$text = eregi_replace("\n","<br>",$text);

Javascript
fldarticle_desc = replace(fldarticle_desc,chr(13),"<br>")

I have tried to add these lines somewhere in my form
a/ edit form, pieces for php and scripts for js
b/ textarea field itself, scripts
after submit,before, after form, before

None seem to work, maybe have to be hard coded in the core files of breezingforms?

2. changing the email subject worked like a charm, much better now.

You have been very helpful mori, saved allot of my time figuring it out...

thanks

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

Re:Custom email noHanstifications howto 11 years 10 months ago #2224

  • Moriwenne
  • Visitor
  • Visitor
Just treat others like you would like to be treated.
I've been there, I'm still there, constantly trying to find answers in forums that provide none. I know how it can be a time saver if someone just provides a little help at the right time.

Best of luck with your endeavours :)

Mori

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

Re:Custom email noHanstifications howto 11 years 8 months ago #2704

  • jimyjimjames's Avatar
  • jimyjimjames
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 27
  • Thanks: 0
Hi Guys

Just curiouse is there a way to manually pull each field, for example i need to display the email in like a time sheet format and need to pull in the variables for each field manually instead of having all of them pulled in by the same command.

i have inserted a table which should paint a picture of what i mean, i havent filled out all the fields just saturday but its meant to show that each area in the table has its own field ie sat date and fri date are 2 seperate fields.

Anyone got any ideas?

James Ashworth
Mediart Solutions
www.mediart.com.au
Attachments:

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

Last edit: Post by jimyjimjames.
Moderators: ForumSupport
Time to create page: 0.059 seconds

Summer Sale!

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!