PHPackages                             stereo/contact-form - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stereo/contact-form

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

stereo/contact-form
===================

Zero Config contact form with logging

2.3.1(1y ago)33.2k↓100%[7 PRs](https://github.com/stereoweb/stereo-contactform/pulls)0BSDPHPPHP &gt;=5.6

Since Aug 14Pushed 1y ago2 watchersCompare

[ Source](https://github.com/stereoweb/stereo-contactform)[ Packagist](https://packagist.org/packages/stereo/contact-form)[ Docs](https://www.stereo.ca/)[ RSS](/packages/stereo-contact-form/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (63)Used By (0)

Stereo Contact Form
===================

[](#stereo-contact-form)

Zero Config Contact Form with Logging for Wordpress

Getting Started
---------------

[](#getting-started)

Install the plugin with the informations specified here

### Prerequisites

[](#prerequisites)

Wordpress with Bedrock, jQuery loaded.

### Installing

[](#installing)

```
composer require stereo/contact-form

```

Usage
-----

[](#usage)

Create forms in raw html and add class "js-stereo-cf" to your form.

```

Thanks.

```

With this code, an email with the message content will be sent to the admin email of your Wordpress installation.

The subject will be "Formulaire de contact"

It will be logged in your Wordpress Administration, with the date, followed by the first field of your form.

### Want to reset form and keet it visible after send?

[](#want-to-reset-form-and-keet-it-visible-after-send)

```

```

### Want to change the email subject to better fit your needs?

[](#want-to-change-the-email-subject-to-better-fit-your-needs)

```

Thanks.

```

### Want to change the title field in the Wordpress Administration ?

[](#want-to-change-the-title-field-in-the-wordpress-administration-)

Setting the data-title to a comma seperated list of fields will concatenate each with a space between.

```

Thanks.

```

### Want to set a category to filter the Administration list in case of multiple forms ?

[](#want-to-set-a-category-to-filter-the-administration-list-in-case-of-multiple-forms-)

The default category is Contact

```

Thanks.

```

### Want to redirect on success ?

[](#want-to-redirect-on-success-)

Set data-redirect with the redirect url

```

Thanks.

```

### Manipulate the "TO" email address

[](#manipulate-the-to-email-address)

If you want the email to go somewhere else :

```
add_filter('st_cf_mail_to',function() {
    return 'Your Mom ';
});

```

### Manipulate the "FROM" email address

[](#manipulate-the-from-email-address)

If you want the email to get from somewhere else :

```
add_filter('st_cf_mail_from',function() {
    return 'Your Mom ';
});

```

### Manipulate the subject of the email

[](#manipulate-the-subject-of-the-email)

If you want to change the subject of emails :

```
add_filter('st_cf_mail_subject',function($subject) {
    return '[My rebranded CMS] '.$subject;
});

```

### Manipulate the content of the email

[](#manipulate-the-content-of-the-email)

If you want to add templating to your email :

```
add_filter('st_cf_mail_content',function($content) {
    return ''.$content.'';
});

```

HEADERS
-------

[](#headers)

Default mail headers are :

```
'From: '.$from
'Content-Type: text/html; charset=UTF-8'

```

If you have a "Courriel" field a replyTo will be added to your headers.

### Field name can be changed

[](#field-name-can-be-changed)

```
add_filter('st_cf_mail_field',function($field) {
    return 'Email';
});

```

### Modify mail headers array

[](#modify-mail-headers-array)

```
add_filter('st_cf_mail_headers',function($headers) {
    $headers[] = "X-Some: More-Headers";
    return $headers;
});

```

### Modify basic message on top of email

[](#modify-basic-message-on-top-of-email)

```
add_filter('st_cf_mailmsg',function($msg) {
    return 'New form entry : ';
    // Default : Nouveau formulaire reçu, voici l'information
});

```

HEADERS
-------

[](#headers-1)

Default mail headers are :

```
'From: '.$from
'Content-Type: text/html; charset=UTF-8'

```

If you have a "Courriel" field a replyTo will be added to your headers.

### Field name can be changed

[](#field-name-can-be-changed-1)

```
add_filter('st_cf_mail_field',function($field) {
    return 'Email';
});

```

### Modify mail headers array

[](#modify-mail-headers-array-1)

```
add_filter('st_cf_mail_headers',function($headers) {
    $headers[] = "X-Some: More-Headers";
    return $headers;
});

```

### Add callback function

[](#add-callback-function)

```

Thanks.

```

### Handle uploaded files

[](#handle-uploaded-files)

All uploaded files with name file\[\] are sent by email by default, but if you want to do anything else with them : If you don't want to uploads file on the server use \_file\[\]

This hook is not triggered if there are no uploaded files.

`$files = array of files``$postid` = ID of saved post ID

```
add_action('st_cf_files',function($files,$postid) {
    foreach($files as $f)  {
        // $f is a temp file path that will be deleted after this hook.
    }
}, 10, 2);

```

### Handle files upload by external source

[](#handle-files-upload-by-external-source)

Send files in mail uploaded before the form is submitted :

Files will be removed from the server after the form is sent. Handle uploaded files if you want to keep them.

`$files = array of files`

```
add_filter('st_cf_files_external',function($files, $post_id) {
    $files[] = $file_name;
    return $files;
}, 10, 2);

```

### Init forms on demands

[](#init-forms-on-demands)

```
if (window.initStereoForm) window.initStereoForm();

```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 55.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~1 days

Total

53

Last Release

696d ago

Major Versions

1.1 → 2.02020-11-26

1.1.1 → 2.0.82021-04-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/3396f6d9af9a3c5f199c79faf549a9b0a2a1dbe891ea6420e4e183d50b7d23a2?d=identicon)[stereo](/maintainers/stereo)

---

Top Contributors

[![Phlag](https://avatars.githubusercontent.com/u/1170529?v=4)](https://github.com/Phlag "Phlag (36 commits)")[![boiss](https://avatars.githubusercontent.com/u/967211?v=4)](https://github.com/boiss "boiss (14 commits)")[![dastou8](https://avatars.githubusercontent.com/u/72143748?v=4)](https://github.com/dastou8 "dastou8 (10 commits)")[![fauche8u](https://avatars.githubusercontent.com/u/44904548?v=4)](https://github.com/fauche8u "fauche8u (5 commits)")

---

Tags

pluginwordpressformcontact

### Embed Badge

![Health badge](/badges/stereo-contact-form/health.svg)

```
[![Health](https://phpackages.com/badges/stereo-contact-form/health.svg)](https://phpackages.com/packages/stereo-contact-form)
```

###  Alternatives

[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.6k](/packages/afragen-git-updater)[webdevstudios/cmb2-attached-posts

Custom field for CMB2 for creating post relationships.

13565.5k](/packages/webdevstudios-cmb2-attached-posts)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
