plugin:bureaucracy
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:bureaucracy [2018-05-05 16:02] – [Action Modes] improve syntax and wording dregad | plugin:bureaucracy [2024-02-09 10:35] (current) – Aleksandr | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : andi@splitbrain.org | email : andi@splitbrain.org | ||
type : syntax, action | type : syntax, action | ||
- | lastupdate : 2018-03-28 | + | lastupdate : 2023-05-16 |
- | compatible : Frusterick Manners, Greebo | + | compatible : Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos |
depends | depends | ||
- | conflicts | + | conflicts |
similar | similar | ||
tags : form, email, poll, create | tags : form, email, poll, create | ||
screenshot_img: | screenshot_img: | ||
+ | |||
downloadurl: | downloadurl: | ||
sourcerepo : https:// | sourcerepo : https:// | ||
Line 23: | Line 24: | ||
===== Download and Installation ===== | ===== Download and Installation ===== | ||
- | Download | + | Search |
==== Changes ==== | ==== Changes ==== | ||
Line 152: | Line 153: | ||
* needs a label | * needs a label | ||
* needs a second argument containing the select options separated by a pipe '' | * needs a second argument containing the select options separated by a pipe '' | ||
+ | * **multiselect** | ||
+ | * you can select multiple values | ||
+ | * needs a label | ||
+ | * needs a second argument containing the select options separated by a pipe '' | ||
+ | * example: '' | ||
+ | * In mail action: all options will be joined by "'', | ||
+ | * In template action: | ||
+ | * if field is marked with " | ||
+ | * during template substitution all options will be joined by "'', | ||
* **radio** | * **radio** | ||
* creates a set of radiobuttons | * creates a set of radiobuttons | ||
Line 198: | Line 208: | ||
* datatypes with a type alias that defines 'valid values' | * datatypes with a type alias that defines 'valid values' | ||
* otherwise it appears as usual textbox, sometimes with [[data# | * otherwise it appears as usual textbox, sometimes with [[data# | ||
- | * **struct_field** (needs plugin) | + | * **struct_field** + **struct_fieldhidden** (needs plugin) |
* Just specify a field from a defined schema "< | * Just specify a field from a defined schema "< | ||
* Label is used from definition as well as validation rules | * Label is used from definition as well as validation rules | ||
Line 274: | Line 284: | ||
< | < | ||
- | * field = Tell us about yourself" | + | * field = Tell us about yourself |
* name = Your Name | * name = Your Name | ||
* age = Your Age | * age = Your Age | ||
Line 363: | Line 373: | ||
==== Mail Mode ==== | ==== Mail Mode ==== | ||
- | This is a simple action. When used default all user input will be sent by email to the configured email address. See the example above how to use it. You may specify multiple recipient mail addresses separated by spaces. | + | This is a simple action. When used default, all user input will be sent by email to the configured email address. See the example above how to use it. You may specify multiple recipient mail addresses separated by commas. |
Line 390: | Line 400: | ||
<code html> | <code html> | ||
- | Dear @@Your Name@@, | + | Dear @@Your Name@@,</br> |
- | + | </br> | |
- | You are < | + | You are < |
- | + | </br> | |
- | We will deliver it fast as possible, see the | + | We will deliver it fast as possible, see the </br> |
- | <a href=" | + | <a href=" |
- | + | </br> | |
- | Kind regards, | + | Kind regards,</br> |
- | Future Machines company | + | Future Machines company</br> |
</ | </ | ||
Line 492: | Line 502: | ||
^Placeholder ^ action ^ | ^Placeholder ^ action ^ | ||
| '' | | '' | ||
+ | |'' | ||
| '' | | '' | ||
|'' | |'' | ||
| %Y %F %a %Y-%m-%d %s... etc | [[phpfn> | | %Y %F %a %Y-%m-%d %s... etc | [[phpfn> | ||
- | | < | + | | < |
- | |''< | + | |''< |
| '' | | '' | ||
| '' | | '' | ||
Line 502: | Line 513: | ||
|'' | |'' | ||
|''< | |''< | ||
+ | |''< | ||
|'' | |'' | ||
|'' | |'' | ||
Line 552: | Line 564: | ||
This action gives the data to a PHP script supplied by the administrator. The script then can do whatever it wants with the data. | This action gives the data to a PHP script supplied by the administrator. The script then can do whatever it wants with the data. | ||
- | The script must be placed in '' | + | The script must be placed in '' |
That means the class has to have the '' | That means the class has to have the '' | ||
Line 572: | Line 584: | ||
use dokuwiki\plugin\bureaucracy\interfaces\bureaucracy_handler_interface; | use dokuwiki\plugin\bureaucracy\interfaces\bureaucracy_handler_interface; | ||
- | class bureaucracy_handler_example | + | class helper_plugin_bureaucracy_handler_example |
/** | /** | ||
Line 617: | Line 629: | ||
* Fifth Number field returns values which are completed with leading zeros. Input of 23 will be returned as 023. | * Fifth Number field returns values which are completed with leading zeros. Input of 23 will be returned as 023. | ||
* Sixth Number is a combination of Two and Fifth | * Sixth Number is a combination of Two and Fifth | ||
+ | |||
+ | ==== Template placeholder @DATE@ ==== | ||
+ | |||
+ | hidden " | ||
+ | hidden " | ||
+ | |||
+ | * in the template placeholder @DATE(..., | ||
+ | * the second parameter (behind the comma) with the strftime syntax can be used for formating the date output, as needed -> note that % in the [[phpfn> | ||
===== Development ===== | ===== Development ===== | ||
Line 658: | Line 678: | ||
' | ' | ||
); | ); | ||
+ | </ | ||
+ | |||
+ | ==== Hook into email action ==== | ||
+ | |||
+ | The event '' | ||
+ | |||
+ | This makes it easier to provide custom fields in bureaucracy emails. | ||
+ | |||
+ | The event data includes the form fields info and all the values, so they can be processed by third-party plugins: | ||
+ | |||
+ | < | ||
+ | $evdata = [ | ||
+ | ' | ||
+ | ' | ||
+ | ]; | ||
</ | </ | ||
Line 785: | Line 820: | ||
* [[: | * [[: | ||
- | * User-Forum: [[https:// | + | * User-Forum: [[https:// |
===== Issues ===== | ===== Issues ===== | ||
Please report bug or feature request on the [[https:// | Please report bug or feature request on the [[https:// |
plugin/bureaucracy.1525528951.txt.gz · Last modified: 2018-05-05 16:02 by dregad