Download the PHP package recranet/craft-forms without Composer

On this page you can find all versions of the php package recranet/craft-forms. 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 craft-forms

Recranet Forms

Form builder plugin for Craft CMS 5. Built for the Elloro Craft boilerplate as a replacement for craftcms/contact-form + contact-form-extensions.

Why it exists: the stock stack silently marks every submission as spam when reCAPTCHA keys are misconfigured — visitors see success, mails never arrive, nobody notices. This plugin treats captcha config errors and spam as fundamentally different things.

Features

Installation

Set the keys in .env:

Usage

Render a form anywhere in Twig:

Custom form templates

Create templates/recranet-forms/form.twig in the project to fully own the markup. The template receives form, options, formErrors, formContent, erroredFormHandle. Required inputs:

captchaTag() renders the hashed timestamp field (submit-timing check) plus the configured captcha widget, its token bound to the given action name — give every form its own. The old recaptchaTag() still works as a deprecated alias.

Email templates are overridable at templates/recranet-forms/_emails/notification.twig and confirmation.twig; values come from submission.values (submit-time snapshot) or submission.value('handle').

Placing a form in page content

Besides the Twig call, forms can be dropped into content: create a field of type Form (Settings → Fields), add it to an entry type / Matrix block / CKEditor entry, and pick the form. The field stores the form's uid, so renaming its handle never breaks the reference.

An empty field renders nothing; so does a field pointing at a form that has since been deleted.

Previewing

The form edit screen has preview panels: Fields → Preview form renders the front-end template, and the Notification/Confirmation tabs preview the emails with sample values (subject included, merge tags resolved). Previews go through the same template resolution as a real render or send, so "Default template" is something you can look at before overriding it. Nothing is sent or stored.

Settings

Plugin settings (CP → Settings → Recranet Forms, stored in project config):

Setting Default Notes
Captcha provider reCAPTCHA v3 none / v2 / v3 / Enterprise / Turnstile
Site/secret key $RECAPTCHA_SITE_KEY / $RECAPTCHA_SECRET_KEY env vars
Score threshold 0.5 below = spam (stored, reviewable)
Reject threshold 0.3 below = definite bot (rejected, not stored)
Fail open on what happens when verification itself errors
Verify token hostname on rejects tokens minted on other hostnames
Honeypot on, rf_website
Minimum submit time 3s 0 disables
Throttle 5 per 60s per IP + form; 0 disables
Sender blocklist empty address / @domain / local-part / IP prefix
Notification language submission's site or always the primary site
Save submissions on off = mail-only mode
Save spam submissions on off = flagged spam is dropped
Retention (days) 0 (keep forever) prunes with Craft GC; per-form override + delete/anonymize mode on the form
Upload volume empty required for file fields; per-form subfolder
Max upload size / extensions 8 MB, pdf,jpg,jpeg,png,doc,docx conservative allowlist by default

Multi-site / translations

Editors type form text themselves, so translations are content too: they live in the database, per site, next to the source form — no developer and no deploy to change a wording.

Open a form and pick a site from the breadcrumb site menu (the same switcher entries use). The primary site holds the source form; every other site shows a source → translation table for the strings visitors and recipients read: field labels, placeholders, descriptions and consent text, option labels, custom validation messages, the form name, and the notification and confirmation subjects and body text. Leave a translation empty and that string falls back to the source, so a half-translated form still renders completely.

Structure — field types, handles, widths, conditional rules — is deliberately shared with the source form. A translated form stays the same form, so submissions from different sites remain comparable, and option values stored with a submission stay in the source language (only their labels translate).

Translate with AI

With recranet/craft-ai-translator installed and configured, each translation site gets a Translate with AI button that fills the missing strings using that plugin's provider — so the project's glossary and tone-of-voice settings apply, and merge tags like {naam} are left alone. Translations an editor already wrote are never overwritten. Without the plugin the button is simply absent and translating stays manual.

Emails render in the language of the site the submission was made on, whoever triggers the send. The owner notification can be pinned to the primary site's language instead — see Notification language under Settings → Storage. The plugin's own strings (validation messages, buttons, the whole control panel) ship translated for nl/en/de/fr/es/it in src/translations/.


All versions of craft-forms with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.0.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 recranet/craft-forms contains the following files

Loading the files please wait ...