Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Date formatting in emails
#16
It seems this is still an issue. However I found a (very fragile) workaround and just post it here for anybody who is interested:

Goal: have the results of multiple workflow functions in one line of html code in workflow emails.
Problem: If they are not seperated by a line break or several spaces they „eat up” some of the code around, apparently even cannibalizing each other.

I wanted to have a custom field value and a date and time of an event in one line like this:


Quote:special appointment on Dec. 6, 2018 at 6.15 a.m.


The code I used is the following:


PHP Code:
<p>$cf_851 on $(general : (__WorkflowFunction__format_date($date_start,'d. F Y') ) at $(general : (__WorkflowFunction__substring($time_start,0,5) )</p



The result is that the time does not appear at all. So I seperated them on different lines like this:


PHP Code:
<p>$cf_851</p>
<
p>on $(general : (__WorkflowFunction__format_date($date_start,'d. F Y') ) </p>
<
p>at $(general : (__WorkflowFunction__substring($time_start,0,5) )</p


But that's ugly:


Quote:special appointment
on Dec. 6, 2018
at 6.15 a.m.


Seperating the functions in the html source code like this is working if...

PHP Code:
<p>$cf_851 
$(general : (__WorkflowFunction__format_date($date_start,'d. F Y') ) 
at $(general : (__WorkflowFunction__substring($time_start,0,5) )</p

Results in the desired formatting...
...if:
- you do not switch to the wysiwyg editor before saving
- if you never edit the email again without fixing these line breaks at the same time.
Reply


Messages In This Thread
Date formatting in emails - partnerwerk - 09-14-2017, 02:00 PM
RE: Date formatting in emails - joebordes - 09-14-2017, 05:45 PM
RE: Date formatting in emails - joebordes - 09-14-2017, 05:48 PM
RE: Date formatting in emails - joebordes - 08-16-2018, 10:59 AM
RE: Date formatting in emails - joebordes - 08-16-2018, 05:07 PM
RE: Date formatting in emails - joebordes - 08-16-2018, 11:37 PM
RE: Date formatting in emails - joebordes - 08-17-2018, 09:40 AM
RE: Date formatting in emails - joebordes - 08-17-2018, 01:54 PM
RE: Date formatting in emails - joebordes - 08-22-2018, 06:48 PM
RE: Date formatting in emails - partnerwerk - 12-05-2018, 07:39 PM
RE: Date formatting in emails - joebordes - 12-09-2018, 10:41 AM
RE: Date formatting in emails - joebordes - 05-07-2019, 07:10 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)