R
R
Roman Musalimov2018-06-25 15:26:04
Joomla
Roman Musalimov, 2018-06-25 15:26:04

AcyMailing adding an extra field?

Good afternoon!
Please tell me how to make and add php code correctly so that the field works? You need to add a field with a phone number.
Thank you.
5b30deddb6dea672982943.png

spoiler
$nameCaption = $params->get('nametext', acymailing_translation('NAMECAPTION'));
$emailCaption = $params->get('emailtext', acymailing_translation('EMAILCAPTION'));
$phoneCaption = $params->get('phonetext', acymailing_translation('PHONECAPTION'));

$displayOutside = $params->get('displayfields', 0);
$displayInline = ($params->get('displaymode', 'vertical') == 'vertical') ? false : true;

$displayedFields = $params->get('customfields', 'name,email,phone');
$fieldsToDisplay = explode(',', $displayedFields);
$extraFields = array();

$fieldsize = $params->get('fieldsize', '80%');
if(is_numeric($fieldsize)) $fieldsize .= 'px';

$currentUserid = acymailing_currentUserId();
if(!in_array('email', $fieldsToDisplay) && empty($currentUserid)) $fieldsToDisplay[] = 'email';

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Gruznykh, 2018-06-26
@pavelcarcass

Adding additional fields to AcyMailing happens without the need for any PHP code tinkering. Study the instruction .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question