Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
5edbea52
Commit
5edbea52
authored
Sep 13, 2017
by
Carsten Rose
Browse files
Feature #4511 / Form: URL Forward - mode dynamic computed - implemented
parent
5eb78cfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
extension/Documentation/Manual.rst
View file @
5edbea52
...
...
@@ -1644,9 +1644,9 @@ Definition
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|Show button | 'new, delete, close, save' (Default: 'new,delete,close,save'): Shown named buttons in the upper right corner of the form. See `form-showButton`_ |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|Forward
| 'client | no | url | url-skip-history' (Default: client): See `form-forward`_. |
|Forward
Mode
| 'client | no | url | url-skip-history' (Default: client): See `form-forward`_. |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|Forward Page
|
URL
or
Typo3 page id/alias
. See `form-forward`_.
|
|Forward
(Mode)
Page
| a)
URL
/
Typo3 page id/alias
or b) Forward Mode (via '{{...}}') or combination of a) & b). See `form-forward`_.
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|Parameter | Misc additional parameters. See `form-parameter`_. |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
...
...
@@ -1774,12 +1774,27 @@ Only with `Forward` == `url` | `url-skip-history`, the definition of `Forward UR
Forward URL / Page
''''''''''''''''''
Possible values:
Type: dynamic URL/Page
^^^^^^^^^^^^^^^^^^^^^^
* `forwardPage=http://john-doe.com` - fix URL.
* `forwardPage=?thanks` - fix Typo3 alias or page id, inside current Typo3 installation.
* `forwardPage=?id=thanks` - same as above, but more complete notation.
* `forwardPage={{SELECT ... }}` - dynamically calculated, after all processing is done. This is very usefull, to redirect to different
targets, depending on user input or other dependency/ies.
Type: dynamic Mode
^^^^^^^^^^^^^^^^^^
* Specify in `forwardPage` any of the forward modes: `forwardPage=no | client | url | url-skip-history`,
* Or vua an SQL statement: `forwardPage={{SELECT IF('{{formModeGlobal:S:anumx)}}'='requiredOff', 'no', 'client') }}`
Type: combined dynamic mode & URL/page
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Syntax: `forwardPage=<mode>|<page>`
* `http://john-doe.com` - fix URL.
* `?thanks` - fix URL, inside current Typo3 installation.
* `{{SELECT ... }}` - dynamically calculated, after all processing is done. This is very usefull, to redirect to different
targets, depending on user input or whatever.
* `forwardPage={{SELECT IF(a.url='','no','url'), '|', a.url FROM address AS a }}`
.. _form-parameter:
...
...
extension/qfq/qfq/QuickFormQuery.php
View file @
5edbea52
...
...
@@ -169,6 +169,21 @@ class QuickFormQuery {
public
function
getForwardMode
()
{
$forwardPage
=
$this
->
eval
->
parse
(
$this
->
formSpec
[
F_FORWARD_PAGE
]);
// Format: [mode/url][|url]
$forwardArray
=
explode
(
'|'
,
$forwardPage
,
2
);
switch
(
$forwardArray
[
0
])
{
case
F_FORWARD_MODE_CLIENT
:
case
F_FORWARD_MODE_NO
:
case
F_FORWARD_MODE_URL
:
case
F_FORWARD_MODE_URL_SKIP_HISTORY
:
case
F_FORWARD_MODE_URL_SIP
:
$this
->
formSpec
[
F_FORWARD_MODE
]
=
$forwardArray
[
0
];
if
(
isset
(
$forwardArray
[
1
]))
{
$forwardPage
=
$forwardArray
[
1
];
}
}
if
(
$this
->
formSpec
[
F_FORWARD_MODE
]
==
F_FORWARD_MODE_URL_SIP
)
{
$forwardPage
=
store
::
getSipInstance
()
->
queryStringToSip
(
$forwardPage
,
RETURN_URL
);
// F_FORWARD_MODE_URL_SIP is not defined in API PROTOCOL. At the moment it's only used for 'copyForm'.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment