Download the PHP package tearoom1/uniform-contact-block without Composer

On this page you can find all versions of the php package tearoom1/uniform-contact-block. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package uniform-contact-block

Contact Form Block Plugin for Kirby

This plugin implements a contact form block using Martin Zurowietz' kirby-uniform plugin for Kirby. The block can be easly added to your blueprints and is fully configurable.

It comes with a simple captcha guard and a spam word guard to prevent spam submissions. It also has the uniform honeypot and honeytime guards enabled by default.

The panel block allows adjustments of the labels of the form.


Features

Getting started

Use one of the following methods to install & use tearoom1/uniform-contact-block:

Composer

Git submodule

If you know your way around Git, you can download this plugin as a submodule:

Clone or download

  1. Clone or download this repository from github: https://github.com/tearoom1/uniform-contact-block.git
  2. Unzip / Move the folder to site/plugins.

If you install the plugin without composer, you have to manually install the dependencies (see below)

Dependencies

Note: Check the corresponding documentation for further information and required configuration. Specifically the uniform.honeytime guard from kirby-uniform is used and needs configuration in your config.php

Languages

The plugin works with single- and multi-language sites. On multi-language sites the form posts to /<language>/uniform-contact, only configured languages are accepted. The confirmation email uses the template success_response_<language> and falls back to English for languages without their own template.

Usage

Use the block by adding it to you blueprints fieldsets if they are defined:

Add the javascript to all pages that use this block. E.g. before the closing body tag in the footer.php

And in the <head> if you want to use the default css:

Note: By default, the snippets always load the assets. See below for more details.

Configuration

You may change certain options from your config.php globally:

Options

Option Default Description
enabled true Enable the plugin
alwaysIncludeAssets true Always include the assets, even if the block is not present on the page
fromEmail From email address for the contact form
toEmail To email address for the contact form
fromName From name for the contact form
formBrowserValidate validate Browser validate the form, either validate or novalidate
formNameRequired true Require the name field
formEmailRequired true Require the email field
formMessageRequired true Require the message field
formNamePattern (?=.*\S).{3,} Pattern for the name field
formEmailPattern [^\s@]+@[^\s@]+\.[^\s@]+ Pattern for the email field
emailEscapeHtml false Escape submitted form values before passing them to Uniform email bodies/templates
confirmationEmail true Send a confirmation email to the submitter. Disable it to prevent the form from being used to send emails to arbitrary addresses. The name in the confirmation is cleaned (no links, email addresses or markup, at most 50 characters); the mail to you keeps the name as entered
theme Set to 'basic' for some basic styling

The option alwaysIncludeAssets determines whether the uniform-contact/js and uniform-contact/css snippets are always printing the assets or only if the block is present on the page. Determining the presence of the block is a little expensive logic and may want to be avoided, depending on the setup.

For the honeytime encryption key: You can generate one with the command head -c 32 /dev/urandom | base64 and then append a base64: prefix. See also https://kirby-uniform.readthedocs.io/en/latest/guards/honeytime/

Email escaping

The default email templates in this plugin are plain-text templates. For that reason, emailEscapeHtml defaults to false: submitted values arrive as readable plain text instead of HTML entities like &lt; and &amp;.

If you replace the email templates with HTML templates or render submitted values as HTML, set emailEscapeHtml to true and escape any custom template output explicitly.

And optional additional configuration for the included plugins. For example:

Styling

In case you are using the default stylesheet, you can adjust the styling. It uses the following css variables that can be overwritten in your own stylesheet.

Also see the css file for the default styling.

You can use the 'basic' theme for a basic styling if you do not have your own form styling.

Support

Uniform Contact Block is free and MIT licensed, and it stays that way. If it saves you time, you can help keep it maintained. Paying is voluntary and any amount is welcome.

Agencies and companies that need an invoice can get a Supporter License. You choose the price and whether it covers one project or your whole company. Lemon Squeezy handles the sale as merchant of record, so you get a proper invoice with VAT. The license adds no features and no priority support.

Support this plugin

License

This plugin is licensed under the MIT License

Credits

Screenshots

Screenshots use sample content at 1408 × 902 pixels. Panel views are cropped to the content area. The main image uses the light theme.

View Light Dark
Overview Light Dark
Panel block settings Light Dark

The contact form previews use the neutral T-Room styling.


All versions of uniform-contact-block with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
getkirby/composer-installer Version ^1.1
mzur/kirby-uniform Version ^5.6
refbw/uniform-simple-captcha Version ^2.1
tearoom1/uniform-spam-words Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tearoom1/uniform-contact-block contains the following files

Loading the files please wait ...