19 declare(strict_types=1);
32 protected string $id =
'';
39 $this->formaction = $a_formaction;
49 $this->target = $a_target;
59 $this->multipart = $a_multipart;
67 public function setId(
string $a_id): void
77 public function setName(
string $a_name): void
79 $this->name = $a_name;
89 $this->keepopen = $a_keepopen;
99 $this->opentag = $a_open;
119 $this->prevent_double_submission = $a_val;
129 $tpl =
new ilTemplate(
"tpl.form.html",
true,
true,
"components/ILIAS/Form");
134 $opentpl =
new ilTemplate(
'tpl.form_open.html',
true,
true,
"components/ILIAS/Form");
136 $opentpl->setCurrentBlock(
"form_target");
137 $opentpl->setVariable(
"FORM_TARGET", $this->
getTarget());
138 $opentpl->parseCurrentBlock();
141 $opentpl->setCurrentBlock(
"form_name");
142 $opentpl->setVariable(
"FORM_NAME", $this->
getName());
143 $opentpl->parseCurrentBlock();
146 $opentpl->setVariable(
"FORM_CLASS",
"preventDoubleSubmission");
150 $opentpl->touchBlock(
"multipart");
173 $opentpl->setVariable(
"FORM_ACTION", $this->
getFormAction());
174 if ($this->
getId() !=
"") {
175 $opentpl->setVariable(
"FORM_ID", $this->
getId());
177 $opentpl->parseCurrentBlock();
178 $tpl->setVariable(
'FORM_OPEN_TAG', $opentpl->get());
180 $tpl->setVariable(
"FORM_CONTENT", $content);
182 $tpl->setVariable(
"FORM_CLOSE_TAG",
"</form>");