Skip to content

Commit

Permalink
Merge pull request #163 from hybridinteractive/develop-v4
Browse files Browse the repository at this point in the history
Update to make sure CP settings are showing.
  • Loading branch information
DynamiteGoesBoom authored Nov 2, 2022
2 parents 9ef7620 + ad90819 commit 2e9e3f3
Show file tree
Hide file tree
Showing 4 changed files with 503 additions and 415 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [4.2.1] - 2022-11-02
Fixed an issue where you couldn't update the Recaptcha settings in the Dashboard. [#162](https://github.com/hybridinteractive/craft-contact-form-extensions/issues/162)

## [4.2.0] - 2022-09-12
Release beta label. Thank you all for helping us test this out so thoroughly! You all rock \m/!

Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Craft Contact Form Extensions

![Icon](./src/icon.svg)

[![Latest Version](https://img.shields.io/github/release/hybridinteractive/craft-contact-form-extensions.svg?style=flat-square)](https://github.com/hybridinteractive/craft-contact-form-extensions/releases)
[![Total Downloads](https://img.shields.io/packagist/dt/hybridinteractive/craft-contact-form-extensions.svg?style=flat-square)](https://packagist.org/packages/hybridinteractive/craft-contact-form-extensions)

# Craft Contact Form Extensions

Adds extensions to the Craft CMS contact form plugin.

- Save submissions to the database and view them in the Control Panel
Expand All @@ -14,7 +14,7 @@ Adds extensions to the Craft CMS contact form plugin.

![Screenshot](resources/screenshot.png)

## Support Open Source.
## Support Open Source

This plugin is licensed under a MIT license, which means that it's completely free open source software, and you can use it for whatever and however you wish.

Expand Down Expand Up @@ -47,54 +47,58 @@ When you overwrite the email templates, your twig view will receive a `submissio
- attachment

## Overriding the form name

When saving submissions to the database the default form name will be "Contact". If you add a `message[formName]` hidden field you can override the form name. This can also used to create multiple form indexes in the Control Panel.

```
```html
<input type="hidden" name="message[formName]" value="myFormName">
```

## Overriding the confirmation template

When sending confirmation option is enabled and custom templates per form are needed, override the template with a hidden field. The template needs to be placed under templates\\_emails folder. Add a hash for safety. The same data is passed as in the default overridden template.

```
```html
<input type="hidden" name="message[confirmationTemplate]" value="{{ 'contact'|hash }}">
```

## Overriding the confirmation subject

When sending confirmation option is enabled and custom subjects per form are needed, override the subject with a hidden field. Add a hash for safety.

```
```html
<input type="hidden" name="message[confirmationSubject]" value="{{ 'confirmationSubject'|hash }}">
```

## Overriding the notification template

When sending notification option is enabled and custom templates per form are needed, override the template with a hidden field. The template needs to be placed under templates\\_emails folder. Add a hash for safety. The same data is passed as in the default overridden template.

```
```html
<input type="hidden" name="message[notificationTemplate]" value="{{ 'contact'|hash }}">
```

## Overriding where the message is sent

```
```html
<input type="hidden" name="message[toEmail]" value="{{ '[email protected]'|hash }}">
```

## Disable recaptcha on a per form basis

```
```html
<input type="hidden" name="message[disableRecaptcha]" value="true">
```

## Disable saving to database on a per form basis

```
```html
<input type="hidden" name="message[disableSaveSubmission]" value="true">
```

## Disable confirmation email on a per form basis

```
```html
<input type="hidden" name="message[disableConfirmation]" value="true">
```

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hybridinteractive/craft-contact-form-extensions",
"description": "Adds extensions to the Craft CMS contact form plugin.",
"version": "4.2.0",
"version": "4.2.1",
"type": "craft-plugin",
"keywords": [
"cms",
Expand All @@ -25,7 +25,7 @@
"prefer-stable": true,
"require": {
"php": "^8.0.2",
"albertcht/invisible-recaptcha": "^1.8",
"albertcht/invisible-recaptcha": "^1.9.1",
"composer/composer": "^2.2.12",
"craftcms/cms": "^4.0.0",
"craftcms/contact-form": "^3.0.0"
Expand Down
Loading

0 comments on commit 2e9e3f3

Please sign in to comment.