-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from hybridinteractive/develop-v4
Develop v4
- Loading branch information
Showing
23 changed files
with
1,995 additions
and
1,465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ This plugin is licensed under a MIT license, which means that it's completely fr | |
|
||
## Requirements | ||
|
||
This plugin requires Craft CMS 3 and the [Contact Form](https://github.com/craftcms/contact-form) plugin. | ||
This plugin requires Craft CMS 4 and the [Contact Form](https://github.com/craftcms/contact-form) plugin. | ||
|
||
## Installation | ||
|
||
|
@@ -57,14 +57,21 @@ When saving submissions to the database the default form name will be "Contact". | |
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. | ||
|
||
``` | ||
<input type="hidden" name="message[template]" value="{{ 'contact'|hash }}"> | ||
<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. | ||
|
||
``` | ||
<input type="hidden" name="message[subject]" value="{{ 'subject'|hash }}"> | ||
<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. | ||
|
||
``` | ||
<input type="hidden" name="message[notificationTemplate]" value="{{ 'contact'|hash }}"> | ||
``` | ||
|
||
## Overriding where the message is sent | ||
|
@@ -73,19 +80,19 @@ When sending confirmation option is enabled and custom subjects per form are nee | |
<input type="hidden" name="message[toEmail]" value="{{ '[email protected]'|hash }}"> | ||
``` | ||
|
||
## Overriding recaptcha on a per form basis | ||
## Disable recaptcha on a per form basis | ||
|
||
``` | ||
<input type="hidden" name="message[recaptchaTemplateOverride]" value="true"> | ||
<input type="hidden" name="message[disableRecaptcha]" value="true"> | ||
``` | ||
|
||
## Overriding saving to database on a per form basis | ||
## Disable saving to database on a per form basis | ||
|
||
``` | ||
<input type="hidden" name="message[saveSubmissionOverride]" value="true"> | ||
<input type="hidden" name="message[disableSaveSubmission]" value="true"> | ||
``` | ||
|
||
## Overriding confirmation email on a per form basis | ||
## Disable confirmation email on a per form basis | ||
|
||
``` | ||
<input type="hidden" name="message[disableConfirmation]" value="true"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,66 @@ | ||
{ | ||
"name": "hybridinteractive/craft-contact-form-extensions", | ||
"description": "Adds extensions to the Craft CMS contact form plugin.", | ||
"type": "craft-plugin", | ||
"version": "1.3.0", | ||
"keywords": [ | ||
"craft", | ||
"cms", | ||
"craftcms", | ||
"craft-plugin", | ||
"craft contact form extensions" | ||
], | ||
"support": { | ||
"docs": "https://github.com/hybridinteractive/craft-contact-form-extensions/blob/master/README.md", | ||
"issues": "https://github.com/hybridinteractive/craft-contact-form-extensions/issues" | ||
}, | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Hybrid Interactive", | ||
"homepage": "https://hybridinteractive.io" | ||
} | ||
], | ||
"require": { | ||
"craftcms/cms": "^3.1", | ||
"craftcms/contact-form": "^2.1", | ||
"albertcht/invisible-recaptcha": "^1.8" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"hybridinteractive\\contactformextensions\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"name": "Contact Form Extensions", | ||
"handle": "contact-form-extensions", | ||
"schemaVersion": "1.0.1", | ||
"hasCpSettings": true, | ||
"hasCpSection": true, | ||
"changelogUrl": "https://github.com/hybridinteractive/craft-contact-form-extensions/blob/master/CHANGELOG.md", | ||
"components": { | ||
"contactFormExtensionsService": "hybridinteractive\\contactformextensions\\services\\ContactFormExtensionsService" | ||
}, | ||
"class": "hybridinteractive\\contactformextensions\\ContactFormExtensions" | ||
"name": "hybridinteractive/craft-contact-form-extensions", | ||
"description": "Adds extensions to the Craft CMS contact form plugin.", | ||
"version": "4.0.0-beta.3", | ||
"type": "craft-plugin", | ||
"keywords": [ | ||
"cms", | ||
"craftcms", | ||
"craft", | ||
"craft-plugin", | ||
"craft contact form extensions" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Hybrid Interactive", | ||
"homepage": "https://hybridinteractive.io" | ||
} | ||
], | ||
"support": { | ||
"docs": "https://github.com/hybridinteractive/craft-contact-form-extensions/blob/master/README.md", | ||
"issues": "https://github.com/hybridinteractive/craft-contact-form-extensions/issues" | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": "^8.0.2", | ||
"albertcht/invisible-recaptcha": "^1.8", | ||
"composer/composer": "^2.2.12", | ||
"craftcms/cms": "^4.0.0", | ||
"craftcms/contact-form": "^3.0.0" | ||
}, | ||
"require-dev": { | ||
"craftcms/ecs": "dev-main", | ||
"craftcms/phpstan": "dev-main" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"hybridinteractive\\contactformextensions\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"name": "Contact Form Extensions", | ||
"handle": "contact-form-extensions", | ||
"changelogUrl": "https://github.com/hybridinteractive/craft-contact-form-extensions/blob/master/CHANGELOG.md", | ||
"documentationUrl": "https://github.com/hybridinteractive/craft-contact-form-extensions/blob/master/README.md", | ||
"components": { | ||
"contactFormExtensionsService": "hybridinteractive\\contactformextensions\\services\\ContactFormExtensionsService" | ||
}, | ||
"require-dev": { | ||
"roave/security-advisories": "dev-master" | ||
"class": "hybridinteractive\\contactformextensions\\ContactFormExtensions" | ||
}, | ||
"scripts": { | ||
"check-cs": "ecs check --ansi", | ||
"fix-cs": "ecs check --ansi --fix", | ||
"phpstan": "phpstan --memory-limit=1G" | ||
}, | ||
"config": { | ||
"platform": { | ||
"php": "8.0.2" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"yiisoft/yii2-composer": true, | ||
"craftcms/plugin-installer": true | ||
} | ||
"allow-plugins": { | ||
"yiisoft/yii2-composer": true, | ||
"craftcms/plugin-installer": true | ||
} | ||
} | ||
} |
Oops, something went wrong.