Advice required on emailing submitted form's details

  • baileynp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1

baileynp replied the topic: Advice required on emailing submitted form's details

Many thanks Mihaela

I'll read those with interest and start to play with them. I'm sure there'll be other questions as I go along. ;)

Thanks again for pointing me in the right direction.
#237666
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Advice required on emailing submitted form's details

Hi again,

Ok, good luck.

If you'll have more questions, feel free to ask.

Regards,

Mihaela
#237679
  • baileynp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1

baileynp replied the topic: Advice required on emailing submitted form's details

Hi Mihaela

As promised, another question.

I've decided to go down the route of sending the email created by the End Submit Piece, and to send the results as HTML content.

The email works, it has data, but I've lost all the formatting I've got on the webpage.

I thought it would simply be a case of including all the CSS files in the HTML's <head> section which I copied from the webpage's source, but that didn't work. :(

How can I replicate the webpage's formatting?

Regards
#237730
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Advice required on emailing submitted form's details

Hello,

Have you set the
$isHtml = true;
as in this article topic:
crosstec.org/en/forums/15-usage/125018-c...backfile.html#230240

Did you do so?

I've tried to add some styling in the <head> and this is working properly:
$this->execPieceByName('ff_InitLib');
$from = 'test@test.com';
$fromname =  'yourname';
$subject = 'mysubject';

$recipient = 'email@gmail.com'; 

$name= ff_getSubmit('name');
$email= ff_getSubmit('email');

$attachment=null;
$isHtml = true;

$body =  "
<html>
<head><style>
        table { color: red; } 
    </style></head>
<body>

<h1>This is the title of email </h1>

<table >
<tr>
<td>
   <strong>Name:</strong>
</td>
<td>
   $name
</td>
</tr>

<tr>
<td>
   <strong>Email:</strong>
</td>
<td>
   $email
</td>
</tr>
</table>
</body></html>";

$this->sendMail($from, $fromname, $recipient, $subject, $body, $attachment, $isHtml);
The table came in red.

You can try to add some style to the <style> tags sirectly as well.
If you wish to include form fields you have to include wanted fields in the body od the email, for example as above.

Regards,

Mihaela
#237732
  • baileynp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1

baileynp replied the topic: Advice required on emailing submitted form's details

Hi

I did set the HTML flag to true.

I think what I'm asking for, though, is a little bit more than online styling. ;)

I'm trying to recreate the look of the webpage in the email content, so the HTML contains lots of calls to classes in various CSS files on my website.

So I guess what I'm trying to do is to take a snapshot of the results page, and email that.

Any suggestions on how to do this?
#237733
  • baileynp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1

baileynp replied the topic: Advice required on emailing submitted form's details

Hi

Any words of wisdom? I'm stuck on this part. :(

Regards
#237744
Moderators: ForumSupporttomeperica
Time to create page: 0.074 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

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

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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 to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here