You are here

function maestro_accept_only_form in Maestro 8.2

Same name and namespace in other branches
  1. 3.x modules/maestro_utilities/maestro_utilities.module \maestro_accept_only_form()

This is the Maestro Interactive Accept Only form. This shows off how the interactive function task can fetch form elements based on the handler field in the queue (set by the template)

The interactive function engine UI task passes the queue ID to the form and the user is responsible for managing the entire form at this point.

Parameters

array $form: The form you will create with this function.

int $queueID: The ID of the queue task ID you are executing.

1 string reference to 'maestro_accept_only_form'
MaestroInteractiveExampleTask::prepareTaskForSave in modules/examples/maestro_interactive_task_plugin_example/src/Plugin/EngineTasks/MaestroInteractiveExampleTask.php
The specific task's manipulation of the values to save for a template save.

File

modules/maestro_utilities/maestro_utilities.module, line 47
You need this if you want to simply use MaestroEngine in code calls as we do.

Code

function maestro_accept_only_form(array &$form, $queueID = 0, $obj = NULL) {
  $form['queueID'] = [
    '#type' => 'hidden',
    '#title' => 'Hidden Queue ID',
    '#default_value' => $queueID,
    '#description' => 'queueID',
  ];
  $form['information_text'] = [
    '#plain_text' => t('Simple Interactive Task with a complete button.'),
    '#suffix' => '<br>',
  ];

  // Overriding the "Accept" default label with the "complete" text.
  $form['actions']['submit']['#value'] = t('Complete');
  return $form;
}