# acymailing/10.10.2/front/Params/fields.php

AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress, version 10.10.2. 55 lines.

- Page: https://pluginprobe.com/plugins/acymailing/10.10.2/code/front/Params/fields.php
- Raw: https://pluginprobe.com/plugins/acymailing/10.10.2/raw/front/Params/fields.php
- Modified: 2025-09-17T09:43:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/acymailing/10.10.2/code/front/Params/fields.php#L10-L20`.

```php
<?php

use AcyMailing\Classes\FieldClass;

include_once __DIR__.DIRECTORY_SEPARATOR.'AcymJFormField.php';

class JFormFieldFields extends AcymJFormField
{
    public function __construct($form = null)
    {
        $this->type = 'fields';
        parent::__construct($form);
    }

    public function getInput()
    {

        $fieldsClass = new FieldClass();
        $allFields = $fieldsClass->getAllFieldsForModuleFront();
        $fields = [];
        foreach ($allFields as $field) {
            $fields[$field->id] = acym_translation($field->name);
        }


        if (ACYM_CMS == 'joomla' && $this->value == '1') {
            $formId = $this->form->getData()->get('id');
            if (!empty($formId)) {
                $this->value = '';
            }
        }

        if (is_string($this->value)) {
            $this->value = explode(',', $this->value);
        }

        if (in_array('None', $this->value)) {
            $this->value = [];
        }
        if (in_array('All', $this->value)) {
            $this->value = array_keys($fields);
        }

        return acym_selectMultiple(
            $fields,
            $this->name,
            $this->value,
            [
                'class' => 'acym_simple_select2',
                'id' => $this->name,
            ]
        );
    }
}

```
