Page 1 of 1

Ignoring blank custom attributes

PostPosted: 1:17pm, Tue 09 Dec, 2014
by gavins38
I've got some custom attributes setup on my phpList configuration for address fields, however some of my contacts don't have data in every custom field, and I was wondering if phpList is capable of ignoring blank custom attributes when included in an email?

At the moment, when I add the custom attributes, those without data in them just get a blank line. I'd like this line not to be included at all. Is this possible?

Re: Ignoring blank custom attributes

PostPosted: 6:11pm, Tue 09 Dec, 2014
by duncanc
You can give a default value to be used when the attribute is empty using this syntax for a NAME attribute
Code: Select all
[NAME%%default]


There is also a plugin that provides conditional placeholders, see the plugins page https://resources.phplist.com/plugins/start.

Re: Ignoring blank custom attributes

PostPosted: 1:49pm, Mon 05 Jan, 2015
by gavins38
Thanks! This has proved to be very helpful.