Commit 83ca108f authored by Carsten  Rose's avatar Carsten Rose
Browse files

Manual.rst: first notes to Multiform.

parent bffc45b1
Pipeline #2414 passed with stages
in 2 minutes and 50 seconds
......@@ -4348,10 +4348,27 @@ Action
in one of the specified required FEs.
.. _multi-language-form:
.. _multi-form:
Multi Language Form
Multi Form
`Multi Forms` are like regular forms, but work on 'n' records at the same time.
Image a form with 3 native FormElements, a statement `multiFormSql={{!SELECT AS _id FROM Person AS p}}` and 20 records
in table `Person`: QFQ will show a form with a table of 3 columns and 20 rows with FormElements, arranged in a table.
* multiFormSql: A uniq column 'id' or '_id' is required. Columns
Simple mode
.. _multiple-languages:
Multiple languages
QFQ Forms might be configured for up to 5 different languages. Per language there is one extra field in the *Form editor*.
Which field represents which language is configured in configuration_.
......@@ -237,7 +237,9 @@ abstract class AbstractBuildForm {
// Per row, iterate over all form elements
foreach ($parentRecords as $row) {
$this->store->setStore($row, STORE_PARENT_RECORD, true);
$jsonTmp = array();
$feTmp = $this->feSpecNative;
......@@ -246,15 +248,16 @@ abstract class AbstractBuildForm {
$htmlElements .= Support::wrapTag('<tr>', $leftColumns . $rightInputs);
// Clean for the next round
$this->feSpecNative = $feTmp;
$rcJson[] = $jsonTmp;
//TODO <th>: 'class' konfigurierbar machen. Spalten ausblendbar machen. 'link' Klasse unterstuetzen.
$tableHead = Support::wrapTag('<tr>', $this->buildMultiFormTableHead($parentRecords[0]));
//TODO <table>: 'class' konfigurierbar machen (tablesorter)
//TODO <thead>: 'class' konfigurierbar machen (sticky)
return '<table class="table"><thead>' . $tableHead . '</thead><tbody>' . $htmlElements . '</tbody></table>';
......@@ -606,7 +606,7 @@ class Store {
* @throws \CodeException
public static function setVar($key, $value, $storeName, $overWrite = true) {
// Check valid Storename
// Check valid Store name
if (!isset(self::$sanitizeStore)) {
throw new \UserFormException("Unknown Store: $storeName", ERROR_UNNOWN_STORE);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment