/project/plugins/contact
/project/plugins/contact
_project
folder content into your project
folder.Key | Value | Description |
---|---|---|
enabled | true | true or false to disable the plugin |
priority | 80 | contact plugin priority |
default_subject | Default subject | Default subject for email |
message_success | Email sended. | Message to show after email send. |
from.name | Flextype | From name |
from.email | sergey.romanenko@flextype.org | From email |
to.name | Flextype | Receiver name. |
to.email | sergey.romanenko@flextype.org | Receiver email |
here is an example of simple contact form:
title: Contact
default_field: title
icon:
name: envelope
set: 'fontawesome|solid'
size: 6/12
hide: true
form:
action: 'contact.contactProcess'
buttons:
submit:
type: submit
title: 'Send'
fields:
mailbox:
type: hidden
default: test
subject:
title: 'Subject'
type: text
size: 6/12
validation:
required: true
email:
title: 'Email'
type: email
size: 6/12
validation:
required: true
message:
title: 'Message'
type: textarea
size: 12
validation:
required: true
Read documentation about creating forms here:
https://github.com/flextype-plugins/form
// Show success message
if (isset(flextype('flash')->getMessages()['success']) and count(flextype('flash')->getMessages()['success']) > 0)
foreach (flextype('flash')->getMessages()['success'] as $message) {
echo $message;
}
}
// Render contact form
echo flextype('form')
->render(flextype('serializers')
->yaml()
->decode(filesystem()
->file(PATH['project'] . '/fieldsets/contact.yaml')
->get()), []);
{# Show success message #}
{% for message in flextype.flash.getMessages()['success'] %}
{{ message }}
{% endfor %}
{# Render contact form #}
{{ flextype.form.render(flextype.serializers.yaml.decode(filesystem().file(PATH_PROJECT ~ '/fieldsets/contact.yaml').get()), {})|raw }}
Twig plugin to present Twig template engine for Flextype.
Blueprints plugin simplifies creating truly customizable user interface and basic logic for data management, like handling user forms with simple config schema that is easy to learn, understand and remember.
jQuery plugin for Flextype.
Form Admin Plugin to manage user forms in Flextype Admin Panel.
Site plugin to display entries content on the website frontend.