#3442 - Add custom sub-fields to ticket types
| Identifier | #3442 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Add custom sub-fields to ticket types |
| Status | Open |
| Handling member | Deleted |
| Addon | tickets |
| Description | When a user selects a ticket type, have additional fields appear, if configured, to require additional information from the user.
An example would be: User is requesting an email address... User opens ticket, chooses "request email" as ticket type, Once ticket type has been selected, an additional field appears asking the user what they wish their email address to be. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
See our contact page code for an example:
https://github.com/ocproducts/composr/blob/master/pages/minimodules_custom/contact.php
~ 95% of that file is just defining the settings for our contact tree.
The core code pattern in a minimodule is just...
<?php
$decision_tree = array(
...
);
require_code('decision_tree');
$ob = new DecisionTree($decision_tree);
$tpl = $ob->run();
$tpl->evaluate_echo();