.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ============================= EXT: Formhandler Subscription ============================= :Author: Christopher :Created: 2010-12-18T19:57:23 :Changed by: Alexander Stehlik :Changed: 2012-11-23T16:13:34 :Classification: formhandler_subscription :Author: Alexander Stehlik :Email: alexander.stehlik.deleteme@googlemail.com :Language: en .. _img-1-img-2-EXT-Formhandler-Subscription: |img-1| |img-2| EXT: Formhandler Subscription ============================================= Extension Key: formhandler\_subscription Language: en Version: 0.0.1 Keywords: Copyright 2012, Alexander Stehlik, This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 \- a GNU/GPL CMS/Framework available from www.typo3.org .. _Table-of-Contents: Table of Contents ----------------- **`EXT: Formhandler Subscription 1 <#__RefHeading__5708_1738894311>`_** **`Introduction 3 <#__RefHeading__5710_1738894311>`_** `What does it do? 3 <#__RefHeading__463_413120346>`_ `Screenshots 3 <#__RefHeading__465_413120346>`_ **`Users manual 4 <#__RefHeading__467_413120346>`_** **`Administration 5 <#__RefHeading__31511_818911409>`_** `Available Formhander configurations 5 <#__RefHeading__1038_258144681>`_ `Edit configuration 6 <#__RefHeading__1040_258144681>`_ `Edit language labels 6 <#__RefHeading__1042_258144681>`_ **`Configuration 8 <#__RefHeading__31515_818911409>`_** `Global options 8 <#__RefHeading__1044_258144681>`_ `Finisher\_GenerateAuthCodeDB 8 <#__RefHeading__1046_258144681>`_ `Finisher\_InvalidateAuthCodeDB 9 <#__RefHeading__1052_258144681>`_ `Finisher\_RemoveAuthCodeRecord 9 <#__RefHeading__1058_258144681>`_ `Finisher\_Subscribe 9 <#__RefHeading__4785_1478693557>`_ `Finisher\_UpdateMmData 10 <#__RefHeading__4865_1478693557>`_ `Finisher\_ValidateAuthCodeUID 11 <#__RefHeading__1074_258144681>`_ `View\_AuthCodeMail 11 <#__RefHeading__1084_258144681>`_ `PreProcessor\_ValidateAuthCodeDB 11 <#__RefHeading__1090_258144681>`_ **`Known problems 13 <#__RefHeading__31525_818911409>`_** **`To-Do list 14 <#__RefHeading__477_413120346>`_** **`ChangeLog 15 <#__RefHeading__31623_818911409>`_** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ The formhandler\_subscription extension provides additional utilities (Finishers, PreProcessors) for the formhandler extension. With these utilites you can build a complete (newsletter) subscription system that includes the subscription itself and updating or deleting a subscription. .. _Features-and-targets-of-this-extention: Features and targets of this extention """""""""""""""""""""""""""""""""""""" - provide a good set of default templates and texts (HTML markup of the templates is based on `http://www.yaml.de `_ , especially the forms are based on the `YAML Form Construction Kit `_ ) - be flexible (since formhandler is really flexible this target is not too hard to archive) - be stealthy: do not let users know if an email address is already registered - provide good documentation - keep it simple: since formhandler already provides a huge feature set we should be able to keep this extension lightweight To use this extension you will need a general understanding how the formhandler extension works, so if you do not know it have a look at `http://www.typo3-formhandler.com/ `_ . .. _Screenshots: Screenshots ^^^^^^^^^^^ This is the default registration form that is included in the extension: |img-3| Users manual ------------ The first step, to get this extension up and running is importing it in the extension manager and creating the required database tables. Since it is based on the formhandler extension you will need to import and install it as a requirement. The second step is to include the static TypoScript setup of the extension in your template: |img-4| To create the page structure that is needed for the registration process you can import one of the t3d files that you can find in Resources/T3D/pagestructure-XX.t3d. At the moment there are only two languages available, english (en) and german (de). Now you need to create a sysfolder where you would like to store your subscriber records. You can use any table you like. By default the tt\_address table is used. If you want to use tt\_address records you will need to install the tt\_addressextension. The last step is setting up the required constants for the extension. If you use the constant editor you should get all information you need. |img-5| The most important settings are the IDs of the different pages you created by importing the t3d file: .. ### BEGIN~OF~TABLE ### .. _Request-subscription-success-PID: Request subscription success PID """""""""""""""""""""""""""""""" .. container:: table-row Constant title Request subscription success PID Page title (English version) Newsletter subcription successful .. _Confirm-subscription-PID: Confirm subscription PID """""""""""""""""""""""" .. container:: table-row Constant title Confirm subscription PID Page title (English version) Newsletter subcription confirmed .. _Request-update-success-PID: Request update success PID """""""""""""""""""""""""" .. container:: table-row Constant title Request update success PID Page title (English version) Request successful .. _Update-subscription-form-PID: Update subscription form PID """""""""""""""""""""""""""" .. container:: table-row Constant title Update subscription form PID Page title (English version) Update subscription .. _Update-subscription-success-PID: Update subscription success PID """"""""""""""""""""""""""""""" .. container:: table-row Constant title Update subscription success PID Page title (English version) Update successful .. _Remove-subscription-success-PID: Remove subscription success PID """"""""""""""""""""""""""""""" .. container:: table-row Constant title Remove subscription success PID Page title (English version) Removal successful .. _Auth-code-invalid-PID: Auth code invalid PID """"""""""""""""""""" .. container:: table-row Constant title Auth code invalid PID Page title (English version) Invalid URL .. ###### END~OF~TABLE ###### That's it. You're good to go :) Hint:by default this extension uses the TYPO3 mailing engine, so please make sure your TYPO3 installation is able to send e-mails. You can check this in the TYPO3 Install Tool. .. _Administration: Administration -------------- The administration of this extension basically consists of creating or editing pages and content elements, modifying TypoScript settings and overwriting language labels. .. _Available-Formhander-configurations: Available Formhander configurations ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is a short overview of the available predefined Formhander configurations: |img-6| .. ### BEGIN~OF~TABLE ### .. _Subscription-request-form: Subscription request form """"""""""""""""""""""""" .. container:: table-row Formhandler configuration Subscription request form Function This is the form that new subscribers can use to sign up for the newsletter. After submitting it, they will receive an email that contains a link that can be used to confirm their subscription. .. _Subscription-confirmation: Subscription confirmation """"""""""""""""""""""""" .. container:: table-row Formhandler configuration Subscription confirmation Function This configuration does not contain a form but only checks for a submitted auth code generated by the “Subscription request form” or the “Subscription update request” configurations. If the submitted auth code is valid, no further action is taken. If it is invalid the user will be redirected to the page configured in the “Auth code invalid PID” constant. .. _Subscription-update-request: Subscription update request """"""""""""""""""""""""""" .. container:: table-row Formhandler configuration Subscription update request Function This form only contains one input field for an e-mail address. If it is submitted, the user will get an e-mail, depending on his subscription state. If he is a new subscriber, he will get an error message. If he is an unconfirmed subscriber, he will get a link for confirming his subscription. If he is a confirmed subscriber, he will get a link for updating his data or unsubscribing from the newsletter. .. _Subscription-update-form: Subscription update form """""""""""""""""""""""" .. container:: table-row Formhandler configuration Subscription update form Function This form is only accessible if the user submitted a valid auth code. If the auth code is valid the form will be loaded with the current data of the user. If the auth code is invalid the user will be redirected to the page configured in the “Auth code invalid PID” constant. .. _Subscription-removal: Subscription removal """""""""""""""""""" .. container:: table-row Formhandler configuration Subscription removal Function This form only consists of a checkbox. If it is checked and the user submits it his data will be deleted from the database and he will be redirected to the page configured in the “Remove subscription success PID” constant. This form is also only accessible, if a valid auth code was submitted. .. ###### END~OF~TABLE ###### .. _Example-configuration-for-direct-mail-categories: Example configuration for direct\_mail categories """"""""""""""""""""""""""""""""""""""""""""""""" There are also example configurations available that let the user choose the direct\_mail categories. The example adds two checkboxes to the example forms where the user can select if he wants to receive the newsletter in German or English. For this to work you will need to create two direct\_mail category records: - Category “English” with UID 1 - Category “German” with UID 2 You will need to use these form configurations instead the ones described above to let the users choose the direct\_mail categories: .. ### BEGIN~OF~TABLE ### .. _Subscription-request-form-direct-mail-categories: Subscription request form - direct\_mail categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Formhandler configuration Subscription request form - direct\_mail categories Function This is the same form as described above but it uses a template that contains to checkboxes for the newsletter languages German and English. It also contains a configuration for the UpdateMmData finisher to update the related direct\_mail categories. .. _Subscription-update-form-direct-mail-categories: Subscription update form - direct\_mail categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Formhandler configuration Subscription update form - direct\_mail categories Function This is the same form as described above but it uses a template that contains to checkboxes for the newsletter languages German and English. It also contains a configuration for the UpdateMmData finisher to update the related direct\_mail categories. .. _Subscription-removal-direct-mail-categories: Subscription removal - direct\_mail categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Formhandler configuration Subscription removal - direct\_mail categories Function This is the same form as described above but when it is submitted all direct\_mail relation records will be removed from the database. .. ###### END~OF~TABLE ###### .. _Edit-configuration: Edit configuration ^^^^^^^^^^^^^^^^^^ The extension is fully configured via TypoScript. The configuration options that are available can be found on the `Formhandler homepage `_ and in the Configuration section of this document. .. _Edit-language-labels: Edit language labels ^^^^^^^^^^^^^^^^^^^^ To overwrite or add language labels you will need two things: Create a language file in the TYPO3 Locallang XML format Add this Locallang file to the configuration of formhandler This is a short example of a Locallang file: :: You can find the Locallang file that is used for the default configuration in Resources/Language/Global.xml. You need to add you own file (let's assume you put it in fileadmin/formhandler\_subscription\_lang.xml) to the configuration of the form(s) where you want add or overwrite labels: :: plugin.Tx_Formhandler.settings.predef { formhandler_subscription_request_subscription { langFile.2 = fileadmin/formhandler_subscription_lang.xm } } If you do not want to use the default Locallang file that comes with this extension, you can use langFile.1instead of langFile.2. Then the default lang file will not be loaded any more. This is a short overview of the available TypoScript configuration keys of the different forms: .. ### BEGIN~OF~TABLE ### .. _Subscription-request-form: Subscription request form """"""""""""""""""""""""" .. container:: table-row Formhandler configuration Subscription request form Configuration key :: formhandler_subscription_request_subscription .. _Subscription-confirmation: Subscription confirmation """"""""""""""""""""""""" .. container:: table-row Formhandler configuration Subscription confirmation Configuration key :: formhandler_subscription_confirm_subscription .. _Subscription-update-request: Subscription update request """"""""""""""""""""""""""" .. container:: table-row Formhandler configuration Subscription update request Configuration key :: formhandler_subscription_request_update .. _Subscription-update-form: Subscription update form """""""""""""""""""""""" .. container:: table-row Formhandler configuration Subscription update form Configuration key :: formhandler_subscription_update_subscription .. _Subscription-removal: Subscription removal """""""""""""""""""" .. container:: table-row Formhandler configuration Subscription removal Configuration key :: formhandler_subscription_remove_subscription .. ###### END~OF~TABLE ###### .. _Configuration: Configuration ------------- Most of the configuration is done with the default Formhandler components. But there are some additional classes that come with this extension. These will be documented here. .. _Global-options: Global options ^^^^^^^^^^^^^^ These options are set in the global section of the form configuration and are not connected to a finisher, pre-processor etc. .. ### BEGIN~OF~TABLE ### .. _authCodeDBExpiryTime: authCodeDBExpiryTime """""""""""""""""""" .. container:: table-row Property authCodeDBExpiryTime Data type string Description This setting defines the time when an auth code gets invalid. This string will be parsed through strtotime(). Be aware that an exception will be thrown if a parsing error occurs. Default 1 day ago .. _authCodeDBAutoDeleteExpired: authCodeDBAutoDeleteExpired """"""""""""""""""""""""""" .. container:: table-row Property authCodeDBAutoDeleteExpired Data type string Description Before an auth code is read from the database all expired auth codes will be deleted by default. If you do not want this you can set this to 0. Default 1 .. ###### END~OF~TABLE ###### .. _Finisher-GenerateAuthCodeDB: Finisher\_GenerateAuthCodeDB ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This finisher is based on the Finisher\_GenerateAuthCodeof the Formhandler extension. The big difference is: the generated auth code is totally random (not only based on the referenced record data), it is stored in the database (in the tx\_formhandler\_subscription\_authcodestable) and it is only valid for one day by default. Additionally the generated code can be used for two purposes: unhiding a record or accessing a form. These are the settings that are relevant to the finisher: .. ### BEGIN~OF~TABLE ### .. _table: table """"" .. container:: table-row Property table Data type string Description Required! The table where the referenced record is stored (e.g. tt\_address). Default .. _uidField: uidField """""""" .. container:: table-row Property uidField Data type string Description The database field that contains the unique identifier of the referenced record. Default uid .. _action: action """""" .. container:: table-row Property action Data type string Description The action that can be triggered when using the auth code. At the moment, two actions are available: - enableRecord - accessForm For more information about what these two actions do have a look at the documentation of PreProcessor\_ValidateAuthCodeDB. Default enableRecord .. _hiddenField: hiddenField """"""""""" .. container:: table-row Property hiddenField Data type string Description The database field that marks a record as hidden. This is normally configured in: $GLOBALS['TCA']['tablename']['ctrl']['enablecolumns']['hidden'] Default The field configured in the TCA in the enablecolumnssection in the key hidden, if this is not set it defaults to 'hidden'. .. ###### END~OF~TABLE ###### .. _Finisher-InvalidateAuthCodeDB: Finisher\_InvalidateAuthCodeDB ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This finisher is very basic. It simply invalidates the submitted auth code by removing it from the database, the session, and the GP array. Additionally, all auth codes referencing the same database record will be removed from the database. Important! Please make sure that you call PreProcessor\_ValidateAuthCodeDBbefore using this finisher. Additionally, the generated auth code has to be generated with the accessFormaction. Otherwise an exception will be thrown if no auth code was submitted or the submitted auth code was invalid. .. _Finisher-RemoveAuthCodeRecord: Finisher\_RemoveAuthCodeRecord ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This finisher deletes the referenced record from the database. It has only one configuration option. .. ### BEGIN~OF~TABLE ### .. _markAsDeleted: markAsDeleted """"""""""""" .. container:: table-row Property markAsDeleted Data type int Description If this is set to 1 the referenced record will only be marked as deleted and it will not be removed from the database. The default is to really delete the record so that the user data is protected. Default 0 .. ###### END~OF~TABLE ###### Important! Like for the Finisher\_InvalidateAuthCodeDByou will have to use the PreProcessor\_ValidateAuthCodeDBand you need to generate the auth code with the accessFormaction. .. _Finisher-Subscribe: Finisher\_Subscribe ^^^^^^^^^^^^^^^^^^^ This finisher does two things. it checks, if the submitted e-mail address (or whatever you want to use as a key, but e-mail probably makes the most sense) already is a subscriber or not, and if the subscriber is confirmed or not According to the result of the check more finishers are called (I call them sub-finishers) And this is how you can configure it: .. ### BEGIN~OF~TABLE ### .. _subscribersTable: subscribersTable """""""""""""""" .. container:: table-row Property subscribersTable Data type string Description Required! This is the table where the subscribers are stored (e.g. tt\_address) Default .. _setTemplateSuffix: setTemplateSuffix """"""""""""""""" .. container:: table-row Property setTemplateSuffix Data type int Description If this is true the template suffix will be modified. - for new subscribers it will be set to \_NEW\_SUBSCRIBER - for unconfirmed subscribers it will be set to \_UNCONFIRMED\_SUBSCRIBER - for confirmed subscribers it will be set to \_CONFIRMED\_SUBSCRIBER. Since this is quite useful in most cases (e.g. you want to send different e-mails to the user for these different cases) the default is 1. Default 1 .. _checkExistenceSelect: checkExistenceSelect """""""""""""""""""" .. container:: table-row Property checkExistenceSelect Data type ->select Description This select configuration is used to check if a subscriber exists in the database or not. There is one additional configuration option that is not available in the default select. This option is showHidden. If this is true, also hidden records will be retrieved, otherwise only non-hidden records are loaded. See `http://wiki.typo3.org/TSref/select `_ Default .. _checkConfirmedSelect: checkConfirmedSelect """""""""""""""""""" .. container:: table-row Property checkConfirmedSelect Data type ->select Description This select configuration is used to check if a subscriber is confirmed. Default .. _finishersNewSubscriber: finishersNewSubscriber """""""""""""""""""""" .. container:: table-row Property finishersNewSubscriber Data type ->finishers Description These finishers are called, if the subscriber does not yet exist in the database. Please be aware: If you have a finisher that has the option returnset to 1 you will also need to set returnto 1 for the subscribe finisher. See `http://www.typo3-formhandler.com/documentation/finisher/ `_ Default .. _finishersExistingUnconfirmedSubscriber: finishersExistingUnconfirmedSubscriber """""""""""""""""""""""""""""""""""""" .. container:: table-row Property finishersExistingUnconfirmedSubscriber Data type ->finishers Description These finishers are called, if the subscriber exists in the database, but has not yet confirmed his subscription. Default .. _finishersExistingConfirmedSubscriber: finishersExistingConfirmedSubscriber """""""""""""""""""""""""""""""""""" .. container:: table-row Property finishersExistingConfirmedSubscriber Data type ->finishers Description These finishers are called, if the subscriber exists in the database and has confirmed his subscription. Default .. ###### END~OF~TABLE ###### .. _Finisher-UpdateMmData: Finisher\_UpdateMmData ^^^^^^^^^^^^^^^^^^^^^^ This finisher does two things. This finisher can be used to update data in a many-to-many relationship in a MM table. There is one limitation: The data you want to insert into the table must not be submitted within an array. So if your prefix for your form fields is myform, the name of your select field or your checkboxes needs to be something like myform[myfield][]. It is not possible to introduce another array like myform[myarray][myfield][]. .. ### BEGIN~OF~TABLE ### .. _table: table """"" .. container:: table-row Property table Data type string /stdWrap Description Required! This is the table where the mm records are stored (e.g. sys\_dmail\_ttaddress\_category\_mm) Default .. _localUid: localUid """""""" .. container:: table-row Property localUid Data type int /stdWrap Description Required!This is normally the UID of the record that is currently updated. You might want to use the stdWrap data property and set it to GP:myformprefix\|uid. Default .. _allowedForeignUids: allowedForeignUids """""""""""""""""" .. container:: table-row Property allowedForeignUids Data type string /stdWrap Description Required if deleteAllis not set to TRUE!For security reasons you must specify the allowed foreign UIDs that the user can submit. You can disable this check by setting disableForeignUidCheckto TRUE. Default .. _foreignUidsField: foreignUidsField """""""""""""""" .. container:: table-row Property foreignUidsField Data type string /stdWrap Description Required if you do not want to remove all records!This is the name of the array field that contains the related records. In the example it needs to be set to myfield. Default .. _uidLocalField: uidLocalField """"""""""""" .. container:: table-row Property uidLocalField Data type string /stdWrap Description With this option you can overwrite the name of the database field that contains the local UIDs. Default uid\_local .. _uidForeignField: uidForeignField """"""""""""""" .. container:: table-row Property uidForeignField Data type string /stdWrap Description With this option you can overwrite the name of the database field that contains the foreign UIDs. Default uid\_foreign .. _disableForeignUidCheck: disableForeignUidCheck """""""""""""""""""""" .. container:: table-row Property disableForeignUidCheck Data type int /stdWrap Description Handle with care! If you set this to 1 the finisher will accept all foreign UIDs the user has submitted. This might be a security risk if you use the finisher to set groups that handle access rights. Default 0 .. _deleteAll: deleteAll """"""""" .. container:: table-row Property deleteAll Data type int /stdWrap Description Set this to 1 if you want to use the finisher to remove all related records. Default 0 .. ###### END~OF~TABLE ###### .. _Finisher-ValidateAuthCodeUID: Finisher\_ValidateAuthCodeUID ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This finisher checks, if the uid that was submitted by the form matches the uid of the record that was referenced by the currently available auth code. This can be used to make sure that the person filling out the update form only can update his or her own record but not the record of other people by manipulating a hidden field in the form. You have to make sure, that the uid that should be validated is submitted in a (hidden) form field. The name of the field either has to have the same name as the uid field that was used to create the auth code (see setting uidFieldof the Finisher\_GenerateAuthCodeDB) or you need to read the UID value by using the compareUidsetting. Important! Like for the Finisher\_InvalidateAuthCodeDB you will have to use the PreProcessor\_ValidateAuthCodeDBand you need to generate the auth code with the accessFormaction. .. ### BEGIN~OF~TABLE ### .. _compareUid: compareUid """""""""" .. container:: table-row Property compareUid Data type int /stdWrap Description This option can be used to specify the UID that will be compared with the the auth code UID. If nothing is specified the finisher will try to read the UID from the GET/POST variable that has the same name as the database field that contains the UID (usually this field is called “uid”). Default .. ###### END~OF~TABLE ###### .. _View-AuthCodeMail: View\_AuthCodeMail ^^^^^^^^^^^^^^^^^^ This view is based on Tx\_Formhandler\_View\_Mail. It works basically exactly like it's parent. But there is one little difference. The auth code stored URL stored in the marker ###value\_authCodeUrl###is parsed by htmlspecialchars(). This is quite unhandy when you want to send plain text e-mails (which this extension does by default). So there is a new marker available that can be used in the plain text mails that has no encoded html characters. This marker is called ###value\_authCodeUrlPlain###. .. _PreProcessor-ValidateAuthCodeDB: PreProcessor\_ValidateAuthCodeDB ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This pre-processor works similar to the Tx\_Formhandler\_PreProcessor\_ValidateAuthCode, but of course there are some differences and enhancements. First of all, it validates the submitted auth code against the auth codes stored in the database (in the tx\_formhandler\_subscription\_authcodestable). Additionally, only auth codes that are not older than one day (this threshold can be configured in the global configuration option authCodeDBExpiryTime) are considered to be valid. Last but not least: auth codes that are invalid already are removed from the database. This can be switched off by the global configuration option authCodeDBAutoDeleteExpired. Like is parent class two pages can be configured: one where the user will be redirected to, if the auth code is valid (redirectPage), and one where the user will be redirected to if the auth code is invalid (errorRedirectPage). If the auth code is correct the configured action will be executed. After that, the user will be redirected if the pre-processor was configured to do so. There are two possible actions at the moment: enableRecord and accessForm: .. _Action-enableRecord: Action “enableRecord” """"""""""""""""""""" If this setting is used as action, the referenced record will be unhidden when the PreProcessor\_ValidateAuthCodeDB is called and the auth code is submitted. After unhiding the record the auth code will be invalidated immediately. .. _Action-accessForm: Action “accessForm” """"""""""""""""""" If this setting is used, PreProcessor\_ValidateAuthCodeDB, is called and the auth code is submitted these actions will be triggered: - the auth code is stored in a session variable so you can link to a different pages without worrying about appending the auth code as a GET parameter - the auth code data is stored in the GP array (accessible as $this->gp) - additinally, the data of the referenced record can be merged in the GP array if this is configured with mergeRecordDataToGP This information is available in the GP array, after validating the auth code: - authCode: the submitted auth code - authCodeData: the auth code data that was stored in the database, this includes - tstamp: the time when the auth code was created or when is was used the last time successfully with the accessForm action - reference\_table: the table where the referenced record is stored - reference\_table\_uid\_field: the uid field of the table where the referenced record is stored - reference\_table\_uid: the uid of the referenced record - reference\_table\_hidden\_field: the hidden field of the referenced record - action: the action that was authorized by this auth code - auth\_code: the auth code itsself - authCodeRecord: the data of the referenced record that was read from the database .. _Configuration: Configuration """"""""""""" These configuration options are available for the PreProcessor\_ValidateAuthCodeDB. .. ### BEGIN~OF~TABLE ### .. _authCodeIsOptional: authCodeIsOptional ~~~~~~~~~~~~~~~~~~ .. container:: table-row Property authCodeIsOptional Data type int Description If this is true the auth code will only be validated if the user has submitted one. If no auth code was submitted the user can access the form but no auth code action is executed. The default behaviour is that if no auth code is submitted the user will either get an error message or he will be redirected to the errorRedirectPage. Default 0 .. _mergeRecordDataToGP: mergeRecordDataToGP ~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property mergeRecordDataToGP Data type int Description If this is true the data of the record that is referenced by the auth code will be merged into the GP array accessible as $this->gp. This means you can access the data of the referenced record with the normal ###value\_[fieldname]###markers. Default 0 .. _doNotInvalidateAuthCode: doNotInvalidateAuthCode ~~~~~~~~~~~~~~~~~~~~~~~ .. container:: table-row Property doNotInvalidateAuthCode Data type int Description By default the auth code is invalidated when the enableRecordaction is used. This can be prevented by setting this to 1. Default 0 .. ###### END~OF~TABLE ###### Information to the additional configuration options can be found in the `Formhandler documentation `_ . Options supported by this pre- processor include: - redirectPage - errorRedirectPage - correctRedirectUrl - additionalParams .. _Known-problems: Known problems -------------- Please be aware that this is a very young and notheavily tested extension. The there might be problems not yet detected. Testing and reporting problems is highly appreciated. .. _To-Do-list: To-Do list ---------- You and find the roadmap in the `forge project of this extension `_ . .. _ChangeLog: ChangeLog --------- You and find the change log in the `forge project of this extension `_ . .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 44 .. :id: graphics5 .. :name: graphics5 .. :vspace: 57 .. :width: 161 .. |img-2| image:: img-2.png .. :align: left .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 48% .. :id: Grafik1 .. :name: Grafik1 .. :width: 52% .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 15% .. :id: Grafik2 .. :name: Grafik2 .. :width: 58% .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 18% .. :id: Grafik3 .. :name: Grafik3 .. :width: 68% .. |img-6| image:: img-6.png .. :align: left .. :border: 0 .. :height: 32% .. :id: Grafik4 .. :name: Grafik4 .. :width: 49%