TOPIC:

User name in pdf attachments 2 years 5 months ago #222605

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 414
I'm glad that you managed to set everything and that it works as it should. :)

I've accidentally posted with the SIZE tags, and right after that edited the post to remove it, that's why you had it, sorry for that.

If you'll have more questions, feel free to post on our forums.

Regards,

Mihaela
The following user(s) said Thank You: Lavett

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

User name in pdf attachments 2 years 5 months ago #222621

  • Topic Author
  • Lavett
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
Is it possible to add full name to the email subject too? Currently I have the name of the form in the subject but it would be neat to see who has submitted before even opening the notification mail. It would be ideal if the subject was "formname from full name".

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

User name in pdf attachments 2 years 5 months ago #222676

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 414
Hi again,

Yes, it is possible to do what you want.
To set the subject of a specific form to "formname from full name" please do the following.
Once again go to \components\com_breezingforms\ and open the file facileforms.process.php.
Around line 5480 you will see this code:
        $subject = BFText::_('COM_BREEZINGFORMS_PROCESS_FORMRECRECEIVED');
        if ($this->formrow->custom_mail_subject != '') {
            $subject = $this->formrow->custom_mail_subject;
        }
Leave that code as it is and right under it paste this code:
         if($this->formrow->name=='formname'){
                        $usermy = JFactory::getUser(); 
                        $fullnamemy =$usermy->name;

                    $subject = 'Formname from '. $fullnamemy;
                    }
NOTE: In the code above replace formname with the name of your form. In the $subject also replace Formname with the name of your form that you want to show in the email subject.

This will do what you wanted.

Usually to avoid coding, the suggested way to do this is to create a hidden element named fullname that collects the submitter's full name and than you could just put in the Custom Email Subject field something like this:
formname from {fullname}
and that would to the same thing.
Since you don't want to create additional elements, in your case the first solution is better.

Let me know if you managed to set this for your form and if you have more questions, feel free to ask.

Regards,

Mihaela

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

User name in pdf attachments 2 years 5 months ago #222695

  • Topic Author
  • Lavett
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 6
  • Thanks: 0
I don't mind adding hidden elements, what I wanted to avoid was having the user enter information again that is already in the system but since you supplied the code I chose that solution.

Thank you again!

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

User name in pdf attachments 2 years 5 months ago #222755

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 414
I'm glad I've helped. :)

Ok, I understand. I thought that you didn't want any kind of additional elements.
Just so you know, if you ever need that, username and full name can be automatically filled in, so the user doesn't have to enter that information, as explained here crosstec.org/en/support/online-documenta...and-classicmode.html .

Either way, I'm glad that we've found the suitable solution for you.

Regards,

Mihaela
The following user(s) said Thank You: Lavett

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

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.049 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

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!