PHP field on email export template

Post Reply
rmcdonald
Investor
Investor
Posts: 417
Joined: 19 Dec 2018, 02:33
Name: Robert McDonald
Location: Auckland, New Zealand
Company Name: Unicloud
Contact:

PHP field on email export template

Post by rmcdonald »

Hi we have some export templates that have field type PHP in them , when these templates are run using the print button on a record the fields are populated in the export template.

However when we try to attach the same template to an email sending rule on record creation it seems the PHP isnt running and the fields on the template are blank.
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: PHP field on email export template

Post by support »

Which type of template do you use? HTML or docx?
Can you show me php code that you are using?
rmcdonald
Investor
Investor
Posts: 417
Joined: 19 Dec 2018, 02:33
Name: Robert McDonald
Location: Auckland, New Zealand
Company Name: Unicloud
Contact:

Re: PHP field on email export template

Post by rmcdonald »

Hi Sergey,

Thanks

We are using an html template - it runs fine when using the print button on the record.

For the template creation we are simply adding the template to our email sending rule as an attachment.

we arent running any code on submit of the record form , but do have some simple code to filter dropdown lists on form load for adding job in the entity.

However the records for this entity are created from an auto action on a related entity. but the only process in the action is related record - add record with some fields.
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: PHP field on email export template

Post by support »

I can't reproduce this issue. I have created PHP code field type and it works in template even if I attach it to email.
Better reproduce this issue on personal demo https://www.rukovoditel.net/demo.php
Post Reply