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-07-07 01:02] – [Fields] add documentation about new multiselect field grosse | plugin:bureaucracy [2024-02-09 10:35] (current) – Aleksandr | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : andi@splitbrain.org | email : andi@splitbrain.org | ||
type : syntax, action | type : syntax, action | ||
- | lastupdate : 2018-05-17 | + | 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 | ||
Line 157: | Line 157: | ||
* 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 '' | ||
- | * example: '' | + | * example: '' |
* In mail action: all options will be joined by "'', | * In mail action: all options will be joined by "'', | ||
* In template action: | * In template action: | ||
Line 208: | 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 284: | 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 373: | 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 400: | 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 502: | 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 512: | Line 513: | ||
|'' | |'' | ||
|''< | |''< | ||
+ | |''< | ||
|'' | |'' | ||
|'' | |'' | ||
Line 562: | 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 582: | 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 627: | 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 668: | 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 795: | 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.1530918123.txt.gz · Last modified: 2018-07-07 01:02 by grosse