Answer the question
In order to leave comments, you need to log in
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.
$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
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 questionAsk a Question
731 491 924 answers to any question