Ignoring blank custom attributes

Questions about Version 3 phpList features (the answer is probably 'Yes!')
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

Ignoring blank custom attributes

Postby gavins38 » 1:17pm, Tue 09 Dec, 2014

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?
gavins38
phpLister
 
Posts: 7
Joined: 10:12am, Thu 04 Dec, 2014

Re: Ignoring blank custom attributes

Postby duncanc » 6:11pm, Tue 09 Dec, 2014

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.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Ignoring blank custom attributes

Postby gavins38 » 1:49pm, Mon 05 Jan, 2015

Thanks! This has proved to be very helpful.
gavins38
phpLister
 
Posts: 7
Joined: 10:12am, Thu 04 Dec, 2014


Return to Does phpList do this?

Who is online

Users browsing this forum: No registered users and 2 guests