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

Multi language requirement

This plugin requires a Kirby multi-language setup. It uses routes that expect the language code as the first segment of the URL. It can easily be stripped down to a single language setup by removing the language code from the routes and a few adjustments.

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
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.

License

This plugin is licensed under the MIT License

Credits


All versions of uniform-contact-block with dependencies

PHP Build Version
Package Version
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 ...