rossriley / bolt-extension-formeditor Goto Github PK
View Code? Open in Web Editor NEWA UI for the Bolt Forms Extension
A UI for the Bolt Forms Extension
If I want to create a boltforms I get this error.
I'm on:
bolt 3.3.1
boltforms 4.1
boltformseditor 4.0
Uncaught Exception: ContextErrorException .
ContextErrorException in FormEditorController.php line 173:
Notice: Undefined index: defaults
}
$cleanname = preg_replace('/[^a-zA-Z0-9_]/', '', $newname);
$fulldata = $this->read();
$fulldata[$cleanname] = $this->config['defaults'];
if ($this->write($fulldata)) {
$this->app['session']->getFlashBag()->set('success', Trans::__('Your new form has been created'));
}
}
Chrome. :Version 62.0.3202.89 (Official Build) (64-bit)
Bolt 3.3.6
When a form is first created, after adding a few empty fields, clicking the delete/trash button does not remove the field. This causes an issue after when trying to save as the empty field can't be saved.
What went wrong?
With the bolt-extension-formeditor installed I could not drag-drop the values inside the select in the backend of bolt.
After I uninstalled the bolt-extensions-formeditor I could drag and drop the values in the select field again.
reproduction
-Install bolt
-install boltforms
-install boltforms editor
-add field to your contenttype with a select like:
tabselect:
type: select
values: tabs/title,id
autocomplete: false
multiple: true
sortable: true
keys: title
-Create a new page or other contenttype and fill the select with values. You will notice you can't drag and drop them anymore.
I got no errors in the console...
Bolt 3.3.6
Boltforms 4.1.12
Boltforms editor 4.0.2
If you have two Forms (simpleform, servicecontact).
You wan't to use different templates for it, so you defined this in bolftform.yaml:
templates:
form: /partials/short_contact_form.twig
email: /partials/short_contact_email.twig
subject: /partials/short_contact_email_subject.twig
files: /partials/boltforms_file_browser.twig
recaptcha:
enabled: false
label: 'Spam-Schutz: Bitte geben Sie den reCaptcha Text ein.'
public_key: ''
private_key: ''
error_message: 'Der reCaptcha-Text wurde nicht korrekt eingegeben. Bitte versuchen Sie es erneut.'
theme: clean
csrf: true
uploads:
enabled: false
base_directory: /full/path/for/uploaded/files/
filename_handling: suffix
management_controller: false
debug:
enabled: false
address: [email protected]
contact:
notification:
enabled: true
debug: false
subject: 'Nachricht von der Webseite'
from_name: pw-druckerservice.de
from_email: [email protected]
replyto_name: name
replyto_email: email
attach_files: false
to_name: 'Me Myself'
to_email: [email protected]
feedback:
success: 'Ihre Nachricht wurde erfolgreich gesendet.'
error: 'Es wurden Fehler im Eingabeformular entdeckt. Bitte überprüfen Sie Ihre Eingaben.'
fields:
name:
type: text
options:
required: true
label: Name
attr:
placeholder: 'Ihr Name…'
constraints:
- NotBlank
-
Length:
min: 3
email:
type: email
options:
required: true
label: Email
attr:
placeholder: 'Ihre Emailadresse…'
constraints:
- NotBlank
- Email
message:
type: textarea
options:
required: true
label: 'Ihre Nachricht…'
attr:
placeholder: 'Ihre Nachricht…'
class: myclass
needreply:
type: choice
options:
label: 'Wünschen Sie einen Rückruf?'
choices:
- Ja
- Nein
multiple: false
attr:
placeholder: ''
expanded: true
phone_no:
type: textarea
options:
label: 'Rückrufnummer und Zeitpunkt '
attr:
placeholder: 'Bitte tragen Sie hier Ihre Telefonnummer und einen Zeitpunkt für den Rückruf ein.'
submit:
type: submit
options:
label: 'Anfrage senden'
attr:
placeholder: ''
class: special
templates:
form: /partials/service_contact_form.twig
email: /partials/service_contact_email.twig
subject: /partials/service_contact_email_subject.twig
files: /partials/service_file_browser.twig
servicecontact:
fields:
.... and so on... here comes the form-fields....
If you now edit the "servicecontact" with Edit Forms, the templates:-Section in front of servicecontact will be gone.
Only the one at the very beginning of this file is untouched.
Even if the Checkbox is unset, all Fields are marked as required.
To mark a field not as required, you need to go to boltforms.yml and set
required: false for the field.
If you don't set this parameter, field is autmaticly required.
Not exactly an issue, but it'd be good to add it in the description since the array short notation makes it crash. Thanks bro.
I can't add a contentype as choice options. Also, when I manually add it
choices: 'contenttype::markten::title::slug'
It works, but when I change something with the editor my manually changes are overrided
Apart from that: Great extension:) I was rejoiced to see it:)
Ross,
I was just curious why you don't set required to false instead of setting a value for required - ad7536d
All fields default to being required instead of the opposite. I would of thought that fields would only be required if the user declares them as being so.
Thanks for your time,
Ratty
This extension is great btw. Thanks.
bolt 3.3.6 php7
The trashcan icon [delete] doesn't seem to be working.
See demo here:
https://monosnap.com/file/OnEXtFMxayp4mSCjvMHFQrJuwWhOnp
Bolt 3.4.3
BoltForms 4.1.14
FormEditor 4.0.2
Hi @rossriley, I am seeing a javascript error even the form editor is working.
the error formeditor.js?8d8663535f:1 Uncaught ReferenceError: Bolt is not defined
showing in every page (admin)
tested on:
Bolt Forms Editor v2.0
Bolt Forms v3.02
Bolt v3.0.8
I have a form that I created in BoltForms manually, it has 3 simple fields: Name, Email, Message
After Installing Bolt Forms I can see it in there:
However, if I try to edit it I get this error:
New forms that I create within FormsEditor can be edited though
Bolt 3.4.3
BoltForms 4.1.14
FormEditor 4.0.2
If I want to save an form via the editor I get this error.
I'm on Bolt 3.3.1
Boltforms 4.1
Boltformseditor 4.0
ContextErrorException in FormEditorController.php line 251:
Notice: Undefined index: required
$fieldkey = $name;
}
$fulldata[$formname]['fields'][$fieldkey]['type'] = $values['type'];
$fulldata[$formname]['fields'][$fieldkey]['options']['label'] = $values['label'];
if ($values['required'] == true) {
$fulldata[$formname]['fields'][$fieldkey]['options']['required'] = true;
} elseif ($values['type'] != 'submit') {
$fulldata[$formname]['fields'][$fieldkey]['options']['required'] = false;
} else {
unset($fulldata[$formname]['fields'][$fieldkey]['options']['required']);
In formeditor.js
, the following looks for the parent
element, which is the wrapper surrounding the form field settings. Since commit #85d692f484f7a9554281a816b7faf11e6759b061, April 15, this .form-field-row
class has changed and thus the delete button does nothing, because parent
is an empty jQuery object.
var parent = trigger.closest('.form-field-row');
Should be:
var parent = trigger.closest('.field-group');
PR incoming.
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.