How to tweak some Formalicious settings?

I have Formalicious installed and working well, but would like to adjust a few things. Any way?

1. Change the default CSV divider to a comma instead of a semicolon.

2. For forms that get sent by email, checkbox fields list all the selected items separated by commas with no spaces after them. That doesn’t look or read very well. I’d to change that to add space after every comma in the list.

I tried editing this section of the file “components > formalicious > src > Formalicious > Snippets > RenderForm.php”, adding spaces after the commas in the “implode” lines, but that didn’t make any difference.

    public function parseFields(array $fields = [], $type = '')
    {
        if ($type === 'names') {
            return implode(',', array_map(function ($value, $key) {
                return $key . '==' . $value;
            }, $fields, array_keys($fields)));
        }

        return implode(',', array_keys($fields));
    }

Hej @snowcreative,

you can add the parameter &emailMultiSeparator=`, ` to the FormIt Call – via Formalicious for each form or in your form chunk (see docs). Then it get saved right in the database.

The default delimiter is hardcoded:

Maybe we can add a Pull Request: Set the delimiter in ExtJS empty and add an default System Setting delimiter via PHP in the processor :thinking:

I don’t see where to add email hooks through Formalicious. I don’t see it in the form settings, and I tried this, which didn’t work:

[[!FormaliciousRenderForm? &form=`1` &emailMultiSeparator=`, `]]

Yes, already submitted a request:

In the Formalicious form → tab “Advanced Settings”, there is a section where you can add parameters (“Here you can add FormIt parameters. These parameters will be added to the FormIt snippet call…”).
Try adding it there.

The part of the code that @jenswittmann linked was from the FormIt extra and not from Formalicious. So I guess you created the issue in the wrong repository.

1 Like

@snowcreative here you go:

Can you test this changes please?

I did that, emptied all caches, and no change.

Doesn’t line 516 of forms.grid.js need to replace the value with a call to the new system setting, not a blank value?

I did that, emptied all caches, and no change.

Did you submit a new form? It should be work for new submissions. Can you post a screenshot?

Doesn’t line 516 of forms.grid.js need to replace the value with a call to the new system setting, not a blank value?

That would be nice. However, if it’s empty, the default value from the system settings is used. Unfortunately, I don’t know ExtJS well enough to retrieve system settings inside ExtJS. So I’ll keep it simple :grinning_cat:

Yes, I did, after clearing all caches.

In formalicious settings:

Received email, just commas with no space after:

Not for me. The field is blank in the popup. Maybe because you are changing the build script to add the new system setting. I added that by hand, and whatever is put in there is not being imported into the popup field. Maybe the build process does something additional to set up the system setting?

New system setting:

Screenshot 2026-03-05 at 10.28.43 PM

Export forms popup:

There exists a global object MODx that you can access in JS. MODx.config contains the system settings (e.g. MODx.config.base_url etc.). This has nothing to do with ExtJS.

1 Like

Yeah, it looks like the way Formalicious works, the values already get concatenated with commas, before the FormIt email-hook has a chance to apply the emailMultiSeparator property.

I guess this is the part in the code, where the comma (for the separator) is hard-coded:


I think the best code fix would probably be, to replace this line in the code

with this instead:

'value' => '[[+' . $field->getName() . ']]'

Yes, that works! Thanks so much.

1 Like

When I put this in the js file:

value       :  MODx.config.formit.export_csv_delimiter

I get a javascript console error:

Cannot read properties of undefined (reading ‘export_csv_delimiter’)

If I change the name of the system setting to just “export_csv_delimiter” without “formit.” on the front of it, then it works. How can we access system settings that have periods in them?

_________________________________

OK, answered my own question. This works (line 516 of forms.grid.js):

value       :  MODx.config['formit.export_csv_delimiter']
1 Like

Thank you both! I updated the PR: Update delimiter fallback in CSV export function by jenswittmann · Pull Request #303 · Sterc/FormIt · GitHub