AddOn
MForm Modul-Input-Formular Addon
Beschreibung
MForm ist ein Redaxo Addon, dass das Erstellen von Modul Formularen erheblich erleichtert. Das Anlegen von, Select-, Multiselect-Feldern, Checkboxen, Radiobuttons, Input-Textfeldern und Textarea-Feldern war noch nie so einfach.
MForm ist ein Redaxo Addon, welches das Erstellen von Modul-Formularen erheblich erleichtert. Dabei nutzt MForm Templates welche es dem Administrator ermöglichen den Modul-Style seinen Vorstellungen anzupassen. MForm stellt alle wesentlichen Modul-Input-Formular Elemente bereit welche sich recht einfach einbinden lassen.
Die aktuellste MForm Version auf Github: https://github.com/FriendsOfREDAXO/mform
Eine umfangreiche Anleitung im Github-Wiki: https://github.com/FriendsOfREDAXO/mform/wiki
Umsetzung
Friends Of REDAXO zum Profil
Versionen
7.0.1
ACHTUNG!
Vollständig neues Release bitte unbedingt die Hinweise beachten
## Version 7.0.1 RENOVATIO
min. PHP-Version 7.4
## Version 7.0.0 RENOVATIO .1
- added column element for some form input column elements
- removed element fragments and added stuff to wrapper fragment
- removed author email address
- wrapper fragment changed, remove id handling in output and js for accordion, collapse and tab
- properties direction changed in `addAccordionField`, `addCollapseField`
- open properties added to `addTabField`
- added inline wrapper element `addInlineElement`
- minor css changes skerbis
- add php 7.x compatibility
- add fragment files
- remove data themes and use fragments as theme templates
- add radio-, checkbox and select toggle options for collapse
- add radio-, checkbox and select toggle options for tabs
- create generic collapse, accordion and tab handling for mblock usage
- remove deprecated stuff
- remove default theme config form in addon page
- ytemplates moved from data to addon root path
- remove docs plugin and unused lang strings
- make example modules installable
- revised all example modules remove all .ini's and use instead of them .inc files
- add new wrapper example files
- validations removed
- changed screenshot
skerbis
- correcting readme skerbis
- add english readme
sckerbis
- add readme to backend pages skerbis
- add changelog to backend navigation
skerbis
- fix double quote issue @dtpop
### Migration to from v6.x.x to v7.x.x
1. Removed class methods: 1. addEditorField 2. addCke5Field 3. addFieldset 4. closeFieldset 5. addTab 6. closeTab 7. addCollapse 8. closeCollapse 9. addAccordion 10. closeAccordion 11. isSerial 12. setToggle 13. setValidation 14. setValidations
2. Renamed class methods: 1. addOption => setOption 2. addAttribute => setAttribute 4. disableOptions => setDisableOptions 5. disableOption => setDisableOption 6. addFieldsetField => addFieldsetArea 7. addCollapseField => addCollapseElement 8. addTabField => addTabElement 9. addAccordionField => addAccordionElement 10. addTooltipInfo => setTooltipInfo 11. addCollapseInfo => setCollapseInfo 12. addParameters => setParameters 13. addParameter => setParameter
### Migration how do?
- `Call to undefined method MForm::addFieldset()` or `MForm::closeFieldset()`
– Use `addFieldsetArea` like `MForm::factory()->addFieldsetArea(‘Label’, MForm::factory()->addTextField(1, [‘label’ => ‘Text’]));`
- `Call to undefined method MForm::addCollapse()` or `MForm::closeCollapse()`
– Use `addCollapseElement` like `MForm::factory()->addCollapseElement(‘Collapse’, MForm::factory()->addTextField(1, [‘label’ => ‘Text’]));`
- `Call to undefined method MForm::addTab()` or `MForm::closeTab()`
– Use `addTabElement` like `MForm::factory()->addTabElement(‘Tab’, MForm::factory()->addTextField(1, [‘label’ => ‘Text’]));`
- `Call to undefined method MForm::addAccordion()` or `MForm::closeAccordion()`
– Use `addAccordionElement` like `MForm::factory()->addAccordionElement(‘Accordion’ MForm::factory()->addTextField(1, [‘label’ => ‘Text’]));`
- `Call to undefined method MForm::addEditorField()` or `MForm::addCke5Field`
– Use `addTextAreaField` with editor attributes like `$mform->addTextAreaField(‘1’, [‘class’ => ‘cke5-editor’, ‘data-lang’ => \Cke5\Utils\Cke5Lang::getUserLang(), ‘data-profile’ => ‘default’]);`
- `Call to undefined method MForm::addOption()` or `MForm::addAttribute()` or `MForm::disableOptions()` or `MForm::disableOption()`
– Check the list `Renamed class methods` and use the new method name instead of the old one
- `Call to undefined method MForm::setToggle()`
– Use `addToggleCheckboxField` instead of `addCheckboxField` with `setToggle`
7.0.0
ACHTUNG!
Vollständig neues Release bitte unbedingt die Hinweise beachten
Diese Version ist nicht kompatibel mit den Vorgängerversionen. Bitte das `Migration how do` beachten.
## Version 7.0.0 RENOVATIO
- added column element for some form input column elements
- removed element fragments and added stuff to wrapper fragment
- removed author email address
- wrapper fragment changed, remove id handling in output and js for accordion, collapse and tab
- properties direction changed in `addAccordionField`, `addCollapseField`
- open properties added to `addTabField`
- added inline wrapper element `addInlineElement`
- minor css changes skerbis
- add php 7.x compatibility
- add fragment files
- remove data themes and use fragments as theme templates
- add radio-, checkbox and select toggle options for collapse
- add radio-, checkbox and select toggle options for tabs
- create generic collapse, accordion and tab handling for mblock usage
- remove deprecated stuff
- remove default theme config form in addon page
- ytemplates moved from data to addon root path
- remove docs plugin and unused lang strings
- make example modules installable
- revised all example modules remove all .ini's and use instead of them .inc files
- add new wrapper example files
- validations removed
- changed screenshot
skerbis
- correcting readme skerbis
- add english readme
sckerbis
- add readme to backend pages skerbis
- add changelog to backend navigation
skerbis
- fix double quote issue @dtpop
### Migration to from v6.x.x to v7.x.x
1. Removed class methods: 1. addEditorField 2. addCke5Field 3. addFieldset 4. closeFieldset 5. addTab 6. closeTab 7. addCollapse 8. closeCollapse 9. addAccordion 10. closeAccordion 11. isSerial 12. setToggle 13. setValidation 14. setValidations
2. Renamed class methods: 1. addOption => setOption 2. addAttribute => setAttribute 4. disableOptions => setDisableOptions 5. disableOption => setDisableOption 6. addFieldsetField => addFieldsetArea 7. addCollapseField => addCollapseElement 8. addTabField => addTabElement 9. addAccordionField => addAccordionElement 10. addTooltipInfo => setTooltipInfo 11. addCollapseInfo => setCollapseInfo 12. addParameters => setParameters 13. addParameter => setParameter
### Migration how do?
- `Call to undefined method MForm::addFieldset()` or `MForm::closeFieldset()`
– Use `addFieldsetArea` like `MForm::factory()->addFieldsetArea(‘Label’, MForm::factory()->addTextField(1, [‘label’ => ‘Text’]));`
- `Call to undefined method MForm::addCollapse()` or `MForm::closeCollapse()`
– Use `addCollapseElement` like `MForm::factory()->addCollapseElement(‘Collapse’, MForm::factory()->addTextField(1, [‘label’ => ‘Text’]));`
- `Call to undefined method MForm::addTab()` or `MForm::closeTab()`
– Use `addTabElement` like `MForm::factory()->addTabElement(‘Tab’, MForm::factory()->addTextField(1, [‘label’ => ‘Text’]));`
- `Call to undefined method MForm::addAccordion()` or `MForm::closeAccordion()`
– Use `addAccordionElement` like `MForm::factory()->addAccordionElement(‘Accordion’ MForm::factory()->addTextField(1, [‘label’ => ‘Text’]));`
- `Call to undefined method MForm::addEditorField()` or `MForm::addCke5Field`
– Use `addTextAreaField` with editor attributes like `$mform->addTextAreaField(‘1’, [‘class’ => ‘cke5-editor’, ‘data-lang’ => \Cke5\Utils\Cke5Lang::getUserLang(), ‘data-profile’ => ‘default’]);`
- `Call to undefined method MForm::addOption()` or `MForm::addAttribute()` or `MForm::disableOptions()` or `MForm::disableOption()`
– Check the list `Renamed class methods` and use the new method name instead of the old one
- `Call to undefined method MForm::setToggle()`
– Use `addToggleCheckboxField` instead of `addCheckboxField` with `setToggle`
6.1.2
Version 6.1.2
- Fix: UTF-8 encoding for arabic and other charsets in link and link-lists
6.1.1
Version 6.1.1
- Adding return types for yform methods
6.1.0
- New: Dark-mode support for REDAXO >= 5.13 schuer
skerbis
6.1.0
- New: Dark-mode support for REDAXO >= 5.13 schuer
skerbis
- Fixed: Version compare @skerbis
6.0.13
@MC-PMOE fixed multiselect
https://github.com/FriendsOfREDAXO/mform/issues/233#issuecomment-934659995
Neu die Prüfung bei JSON Values 1.x.x
6.0.11
Es ist ggf. erforderlich, dass Anpassungen durchgeführt werden müssen.
dtpop,
IngoWinter, skerbis, multiple issues fixed regarding single select- and multiselect-fields
- Allow callable
DanielWeitenauer
It is strongly recommended to use the correct JSON notations for select fields from the documentation.
Incorrect:
`$mform->addSelectField(“$id.width”`
Correct:
`$mform->addSelectField(“$id.0.width”`
or
`$mform->addSelectField(“1.0”,`
or
`$mform->addSelectField(1,`
Update-Hinweis fürUpdates von 5.x zu 6.x: zu REDAXO Widgets REX_LINKLIST, REX_LINK, REX_MEDIA, REX_MEDIALIST
Nach dem Update sind diese nicht mehr über die JSON-Values erreichbar. (Diese Nutzung wurde nie empfohlen)
Beispiel: `$mform->addMediaField(“$id.0.slide_image”, array(‘label’=>‘Bild’));`
Die Daten sind nicht weg und immer noch erreichbar. Allerdings z.B. als REX_MEDIA_2 gespeichert
Nach Änderung der Eingabe zu $mForm->addLinkField(X); bzw. $mForm->addMediaField(X);(X steht für die ID) wird das Widget wiederhergestellt.
Am besten einen Dump der Ausgabe vorher erzeugen um die id zu ermitteln und dann Ein- und Ausgabe anpassen.
Version 6.0.3
prepareCustomLink fixed @bitshiftersgmbh
Version 6.0.2
- readme style fixes crydotsnake
- remove .formcontrol on input fields type color
olien
- some validation methods changed and calls deleted @skerbis
Version 6.0.1
- added some docs
- minor bugfixes
Version 6.0.0
- use rex_factory_trait in MForm class
- added YForm Links in custom_link
- removed `parsley` validation
skerbis, you should use html validations: https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation * deprecated `closeCollapse`, `closeTab`, `closeAccordion` * change `addCollapse`, `addAccordion`, `addTab` functionality, use `addForm` to add content in this methods * added `addForm` method * added Media inUseCheck for media inside `custom_link` and `imagelist` in YForm * added some styling * added some Svensk översättning
interweave-media - added some English translation
ynamite * added some docs
skerbis
Breaking changes:
**Bitte Namespaces beachten, z.B. bei: **
`MForm\Utils\MFormOutputHelper::prepareCustomLink()`
The REX_CUSTOM_LINK Var now saves the data in a regular REX_VAR. So the usage of REX_CUSTOM_LINK is not backward compatible. You should move the values from Linklist to a value field.
Parsley has been removed. All validations have been removed.
removed `closeCollapse`, `closeTab`, `closeAccordion`
> Look at the new wrapper field examples
5.3.1
### 5.3.1
Ein Problem mit JSON-Values wurde behoben. Es war nicht mehr möglich Module mit JSON-Values zu erstellen oder zu pflegen.
### Version 5.3
MFORM ist jetzt noch besser :-)
Nicht nur für Module
- Custom Links jetzt in rex_form und YForm möglich
- Die ImgList ist jetzt Teil von MFORM. Und jetzt auch in YForm und rex_form einsetzbar
Wer die Formulare nicht mit MFORM bauen will, aber dennoch die Widgets benutzen möchte:
Bitteschön: REX_IMGLIST[] und REX_CUSTOM_LINK[]
- added custom link as widget REX_CUSTOM_LINK[]
- exchange custom link for yform and rex_form
- added image list widget for mfrom, rex_form and yform REX_IMGLIST[]
5.2.4
re-add special input types support
5.2.2
Parameter must be an array warning fix
5.2.1
- fixed: Media-Button Parameter type space
- Link-Title for Custom-Link Buttons added
- Attributes for media- and link-elements added, which allows validation via Parsley
- fixed: c14n html body wrapping removed
- now uses includeCurrentPageSubPath to show pages
christophboecker * Cache buster will be added by rex core
staabm - init.js simplified @staabm
- Add Info Tooltip
- Bootstrap Toggle Checkbox als neues Element addToggleCheckboxField hinzugefügt
- 4 Alert Message Elemente hinzugefügt
- Collapse Panel für Formular elemente hinzugefügt, das steuern der Collapse über Checkboxen ist möglich
$mform->addToggleCheckboxField(‘1.show_icons’, [1 => ‘’], [‘label’ => ‘Icon verwenden’, ‘label-col-class’ => ‘col-md-3’, ‘form-item-col-class’ => ‘col-md-9’], null, 1);
setLabelColClass und setFormItemColClass hinzugefügt, ermöglicht das überschrieben der Standard “col-md-x” Classen
$mform->addTextField(‘2.0.title’, [‘label’ => ‘Titel’], [‘empty’]);
$mform->setLabelColClass(‘col-md-3’);
$mform->setFormItemColClass(‘col-md-9’);
$mform->addAlertInfo(‘Heads up! This alert needs your attention, but it\‘s not super important.’);
$mform->addAlertSuccess(‘Well done! You successfully read this important alert message.’);
$mform->addAlertDanger(‘Oh snap! Change a few things up and try submitting again.’);
$mform->addAlertWarning(”Warning! Better check yourself, you’re not looking too good.”);
5.1.1
MForm Modul-Input-Formular Addon Version 5.1.1 für Redaxo 5
Hinweis: Nach Update könnte eine “reinstall” nötig sein.
ACHTUNG: Bei Updates von Seiten in denen MForm-Multiple-Selects genutzt werden wird es zu Problemen kommen! Die Modulausgaben müssen angepasst werden.
Zu beachten: Bei Aktualisierungen von Versionen kleiner als 5.1.0
Ein Hidden-Input Feld welches Komma-separiert die selected-options aufnimmt gibt es nicht mehr.
Multiple Selects werden künftig als JSON-String direkt im REX_VALUE gespeichert. Dies Wirkt sich auf die Auswertung der REX_VALUES im Modul-Output aus.
Weitere Infos unten:
5.1.1- PHP 7.2-fix
- add doc plugin
- custom link add mailto, tel link buttons
- add diverse examples
- remove unused old mform 4
- fix fieldset autolose bug
- multiple select js removes
- use array insert name for multiple selects
- add tabs
- news tab style by Thomas Skerbis
- fix theme config name bug
- add attribute to checked elements
- class refactoring
- remove help.php
5.0.0-beta-3
MForm Modul-Input-Formular Addon Version 5.0.0-beta-3 für Redaxo 5
- komplett neue Code-Basis
- diverse Bugs behoben
- Validierung via Parsley 2
- vieles mehr
3.0.0
MForm Modul-Input-Formular Addon Version 3.0.0 für Redaxo 4.6.x