Coder Social home page Coder Social logo

tobimori / kirby-dreamform Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 4.0 830 KB

✨ DreamForm is an opiniated form builder plugin for Kirby CMS that makes forms work like magic

Home Page: https://plugins.andkindness.com/dreamform

PHP 82.15% Vue 17.35% SCSS 0.09% JavaScript 0.41%
form-builder forms kirby kirby-4 kirby-cms kirby-plugin uniform

kirby-dreamform's Introduction

Kirby DreamForm Banner

Kirby DreamForm

DreamForm is an opiniated form builder plugin for Kirby CMS that makes forms work like magic.


Create powerful single or multi-step forms with a Layout builder directly inside your panel. Create complex submission behaviour workflows with actions. DreamForm supports numerous built-in fieldtypes & actions, but can be expanded and customized as easily as Kirby itself.

Read more about DreamForm on the official plugin website.

Comparison

Feature Comparison DreamForm Form Block Suite Uniform1
Pricing (per license/site) 45 € 25 US$ Free
Single-step forms
Multi-step forms
Create custom forms
...with Blocks in the panel
...with Layouts (multi-column) in the panel
Customize behaviour after submission
...in the panel
...using hooks
Use with JavaScript (API submission)
Use without JavaScript (Form submission)
First-party HTMX support
Built-in fields
Text 2
Multi-line text 2
Email (using Input) 2
Number (using Input) 2
Select 2
Radio 2
Checkboxes 2
File uploads 2
Built-in actions
Email
Redirect
Abort
Webhook
Conditional Action
Buttondown 1.1+
Discord
Mailchimp 1.2+
Built-in guards
Akismet 1.1+
CSRF
IP-based Rate limiting
Honeypot
Turnstile Captcha via third-party plugin
Other
Re-use forms in different places Each block is a unique form
Mark submissions for spam 1.1+
Stores submissions in the panel Sent emails will be stored
Permissions for limiting access
Gravatar integration
Disposable & invalid email domain check 1.1+

1 Technically, you can built most of the features that DreamForm offers yourself using Uniform. For a fair comparison, this table only includes features that can be solved by copying code from the official docs & without writing custom code.

2 Since Uniform focuses on form validation, all fields are technically possible, but none ship with pre-built HTML snippets.

License

Kirby DreamForm is not free software. In order to run it on a public server, you'll have to purchase a valid Kirby license & a valid DreamForm license.

Copyright 2024 © Tobias Möritz - Love & Kindness GmbH


The plugins' name is a homage to Kirby's Dream Land.

kirby-dreamform's People

Contributors

kiahreading avatar medienbaecker avatar ovenum avatar tobimori avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kirby-dreamform's Issues

Select fields do not retain their values on page reload when form does not validate

When trying to submit a form that does not validate, the page gets reloaded showing an error message. If I have selected an option from a select-field before submitting, my choice gets lost and I have to select the desired option again.

The expected result would be for the option to be remembered and kept until the form is successfully submitted.

As a sidenote: is there a special reason why the required-attribute is not inserted in required fields? This would add an extra-validation layer before submission and is supported by virtually all modern browsers.

Numbers as values are not read correctly

First of all, great plugin!

I made a set of radio buttons for a 5-star rating system: Value for the first option is "1", label is "⭐️", and so on...

Answers (values) are correct stored in the content files, but not displayed in the structure field in the panel as answers (empty column).

The other way round, value is "⭐️" and label is "1", it works.

Bildschirmfoto 2024-06-12 um 12 53 19

Bildschirmfoto 2024-06-12 um 12 55 03

Undefined variable $append

When using Kirby's cache and something other than the api mode I get this error when submitting forms:

Whoops\Exception\ErrorException thrown with message "Undefined variable $append"

Stacktrace:
#6 Whoops\Exception\ErrorException in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Models/SubmissionPage.php:273
#5 Whoops\Run:handleError in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Models/SubmissionPage.php:273
#4 tobimori\DreamForm\Models\SubmissionPage:redirectToReferer in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Models/FormPage.php:368
#3 tobimori\DreamForm\Models\FormPage:render in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/kirby/src/Cms/App.php:775
#2 Kirby\Cms\App:io in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/kirby/src/Cms/App.php:1189
#1 Kirby\Cms\App:render in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/index.php:5
#0 require in /Applications/Herd.app/Contents/Resources/valet/server.php:151

I'd suggest the following change:

return  $kirby->response()->redirect(
-  ($this->referer() ?? $this->site()->url()) . isset($append) ? $append : ''
+ ($this->referer() ?? $this->site()->url()) . (isset($append) ? $append : '')
);

Whitespace in field label spans

On a regular text field there is whitespace before and after the actual text, which can lead to styling problems:

<span>
		Termin	</span>

Empty referer crashes page

Sorry but after solving #23 I run into the next breaking error. Somehow my referer seems to be null while the function expects a string?

TypeError thrown with message "tobimori\DreamForm\DreamForm::findPageOrDraftRecursive(): Argument #1 ($path) must be of type string, null given, called in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Models/SubmissionPage.php on line 41"

Stacktrace:
#10 TypeError in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/DreamForm.php:180
#9 tobimori\DreamForm\DreamForm:findPageOrDraftRecursive in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Models/SubmissionPage.php:41
#8 tobimori\DreamForm\Models\SubmissionPage:findRefererPage in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Actions/EmailAction.php:153
#7 tobimori\DreamForm\Actions\EmailAction:templateValues in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Actions/EmailAction.php:181
#6 tobimori\DreamForm\Actions\EmailAction:subject in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Actions/EmailAction.php:208
#5 tobimori\DreamForm\Actions\EmailAction:run in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Models/FormPage.php:284
#4 tobimori\DreamForm\Models\FormPage:submit in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/site/plugins/kirby-dreamform/classes/Models/FormPage.php:325
#3 tobimori\DreamForm\Models\FormPage:render in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/kirby/src/Cms/App.php:775
#2 Kirby\Cms\App:io in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/kirby/src/Cms/App.php:1189
#1 Kirby\Cms\App:render in /Users/thguenther/Arbeit/Projekte/VerlageGegenRechts/index.php:5
#0 require in /Applications/Herd.app/Contents/Resources/valet/server.php:151

Edge cases when using multiple forms on the same page

If I am not missing the obvious and that’s already possible — it would be nice if the page scrolls to the form and/or the error-/success-messages after submit. Otherwise it’s easy to miss submission errors (on longer pages where the form is further down).

Obviously this would be easy with a #-link, but I have no idea how to implement this, and hardcoding an URL is not an option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.