tobimori / kirby-dreamform Goto Github PK
View Code? Open in Web Editor NEW✨ DreamForm is an opiniated form builder plugin for Kirby CMS that makes forms work like magic
Home Page: https://plugins.andkindness.com/dreamform
✨ DreamForm is an opiniated form builder plugin for Kirby CMS that makes forms work like magic
Home Page: https://plugins.andkindness.com/dreamform
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.
On a regular text field there is whitespace before and after the actual text, which can lead to styling problems:
<span>
Termin </span>
Currently, it's not possible to use forms without a Button field, however you can still submit them using hotkeys.
Hello, I use Twig plugin on my Kirby projects and recently I tried to use your plugin. There is a issue with slots: snippet throws error "**Undefined variable $slot **".
It seems similar to #37.
Could you point me to a solution?
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.
Discover creating the page automatically when it's accessed
Workaround:
Use the manual installation directions for now
Your plugin looks very useful. I'm just missing one thing, an export function of the form submissions.
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
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 : '')
);
Error location:
/var/www/html/site/plugins/kirby-dreamform/snippets/fields/partials/wrapper.php
When I follow the instructions from Using Forms
I get **Undefined variable $slot **.
I just can't seem to get this plugin to work.
No matter what I do, after I add the email
action I get an error "" is not a valid email address
. It doesn't matter if I choose "static" or "from user input" in the action block. The email address doesn't seem to matter either. Once I remove the block it works (the submission in the panel).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.