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-04-19 09:46] – [Dependencies with Fieldsets] Klap-in | 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 | + | 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 33: | Line 34: | ||
==== Recommended additional Plugins ==== | ==== Recommended additional Plugins ==== | ||
- | You might want to use on an open wiki the [[CAPTCHA]] plugin to avoid automated spam. When captcha plugin | + | On an open wiki, you might want to use the [[CAPTCHA]] plugin to avoid automated spam. When it is installed, |
+ | |||
+ | The [[SMTP]] plugin may help when your DokuWiki can't send mails. | ||
+ | |||
+ | When you use Bureaucracy' | ||
+ | |||
+ | The recent [[Struct]] plugin draws heavy inspiration from the data plugin and allows for central management of wanted structured data while keeping the functionality of the data plugin. The struct plugin supports integration with the Bureaucracy Plugin. This allows reusing the input mechanisms of the different types in Bureaucracy forms and creation of structured data when pages are created through Bureaucracy' | ||
+ | |||
+ | === Additional Actions === | ||
+ | |||
+ | An additional plugin to look at is [[pagemod]], | ||
+ | |||
+ | === Additional Fields === | ||
- | // | + | The [[Data]] plugin |
- | An additional plugin to look at is the [[pagemod]] plugin | + | |
- | // | + | With [[Struct]] plugin, you can use any [[plugin: |
- | The [[Data]] plugin can be useful in templates as mentioned before, but it provides a '' | + | |
==== Warning ==== | ==== Warning ==== | ||
Line 137: | Line 148: | ||
* creates a checkbox | * creates a checkbox | ||
* needs a label | * needs a label | ||
- | * needs default values for yes and no ('' | + | * needs default values for yes and no ('' |
* **select** | * **select** | ||
* creates a dropdown list | * creates a dropdown list | ||
* 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 188: | 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 264: | 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 343: | Line 363: | ||
===== Action Modes ===== | ===== Action Modes ===== | ||
- | The bureaucracy | + | Bureaucracy |
- it displays a neat form | - it displays a neat form | ||
- it validates user input | - it validates user input | ||
- | - it gives the user input to a action mode | + | - it sends the user' |
- | The last step is where the data is processed. | + | The last step is where the data is processed. |
==== 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 380: | 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 482: | 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 492: | Line 513: | ||
|'' | |'' | ||
|''< | |''< | ||
+ | |''< | ||
|'' | |'' | ||
|'' | |'' | ||
Line 542: | 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 562: | 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 607: | 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 648: | 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 775: | 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.1524123965.txt.gz · Last modified: 2018-04-19 09:46 by Klap-in