Html::getOpenMassiveActionsForm PHP Method

getOpenMassiveActionsForm() static public method

Get open form for massive action string
static public getOpenMassiveActionsForm ( $name = '' ) : open
$name given name/id to the form (default '')
return open form string
    static function getOpenMassiveActionsForm($name = '')
    {
        global $CFG_GLPI;
        if (empty($name)) {
            $name = 'massaction_' . mt_rand();
        }
        return "<form name='{$name}' id='{$name}' method='post'\n               action='" . $CFG_GLPI["root_doc"] . "/front/massiveaction.php'>";
    }

Usage Example

Example #1
0
 /**
  * Display open form for massive action
  *
  * @since version 0.84
  *
  * @param $name given name/id to the form   (default '')
  *
  * @return nothing / display item
  **/
 static function openMassiveActionsForm($name = '')
 {
     echo Html::getOpenMassiveActionsForm($name);
 }
Html