jsemajtacka / contact-form
Simple Nette Framework extension for contact form.
2.0.1
2023-07-19 15:16 UTC
Requires
- php: >= 8.0
- nette/application: ^3.1
- nette/di: ^3.1
- nette/forms: ^3.1
- nette/schema: ^1.2
README
This is a simple Nette Framework extension for Contact Form.
Contact form consists of these fields: name
, email
, message
. It also tracks the sentAt
time and offers boolean status done
for administration of (un)read messages.
Installation
Use Composer to install this extension:
$ composer reguire jsemajtacka/contact-form
Configuration
Add this to your configuration .neon file:
extensions:
contactForm: JsemAjtacka\ContactForm\DI\ContactFormExtension
contactForm:
contactFormService: Path\To\Your\Text\Block\Service\Class
template: Path\To\Your\Latte\Template
The template
argument is optional.
Example of usage
BasePresenter.php:
class BasePresenter extends Nette\Application\UI\Presenter
{
#[Inject]
public ContactFormFactory $contactFormFactory;
protected function createComponentContactForm(): ContactFormControl
{
return $this->contactFormFactory->create();
}
}
@layout.latte:
{control contactForm}