Commit 890bcd19 authored by Carsten  Rose's avatar Carsten Rose
Browse files

QuickFormQuery.php: missing 'r' in forms forces no longer an exception,...

QuickFormQuery.php: missing 'r' in forms forces no longer an exception, instead r=0 is the default. This is usefull in report for 'new' links to forms (it's not necessary to specify r=0 in '_pagen') as well as on record definition `form=person`: `r=0` is not needed anymore.
parent 014e0fde
......@@ -41,8 +41,9 @@ QFQ Keywords (Bodytext)
| | * by SIP: **form = {{form}}** |
| | * by SQL: **form = {{SELECT c.form FROM conference AS c WHERE c.id={{a:C}} }}** |
+-------------------+---------------------------------------------------------------------------------+
| r | recordId. If specified, the form will load the record with the specified id |
| | * Fix. E.g.: **r = 123**, by SQL: **r = {{SELECT ...}}** |
| r | recordId. The form will load the record with the specified id |
| | * Variants: **r = 123**, by SQL: **r = {{SELECT ...}}** |
| | * If not specified, the default is '0' |
+-------------------+---------------------------------------------------------------------------------+
| <level>.db | Select a DB. Only necessary if a different than the standard DB should be used. |
+-------------------+---------------------------------------------------------------------------------+
......@@ -101,16 +102,17 @@ Debug
Form
----
* Forms will be created by using the *Form editor* (HTML form). The Formeditor itself consist of two regular QFQ forms: *form* and *formElement*
* Forms will be created by using the *Form editor* on the Typo3 frontend (HTML form).
* The Formeditor itself consist of two predefined QFQ forms: *form* and *formElement*
* Every form consist of a) a *Form* record and b) multiple *FormElement* records.
* A form is assigned to a *table*. Such a table is called the *primary table* for this form.
* There are three types of forms:
* There are three types of forms which can roughly categorized into:
* *Simple* form: the form acts on one record, stored in one table.
* The form will create necessary SQL commands for insert, update and delete automatically.
* *Advanced* form: the form acts on one record, stored in more than one table.
* *Advanced* form: the form acts on multiple records, stored in more than one table.
* Fields of the primary table acts like a *simple* form, all other fields have to be specified with *addNupdate* records.
......
......@@ -438,7 +438,9 @@ class QuickFormQuery {
// Missing 'r' is in general an error
if ($r === false) {
throw new UserFormException("Missing RECORD_ID (broken SIP?).", ERROR_MISSING_RECORD_ID);
$r = 0;
$this->store->setVar(TYPO3_RECORD_ID, $r, STORE_TYPO3);
$recordIdFoundInStore = STORE_TYPO3;
}
// If there is a record_id>0: EDIT else NEW: 'sip','logged_in','logged_out','always','never'
......
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