[TYPO3-english] 2 problems with formhandler

carmen fröwis cf.modulor at gmail.com
Mon May 10 14:45:38 CEST 2010


hi list!

i am setting up a registering-tool with formhandler. there are 2 pages with
the formhandler-plugin (2 single steps, not multistep because the user
should receive an email after the first step. the user enters his data an
after submit he should see the submitted_ok-site and receive an email. the
data is stored in tt_address (3 entries), tt_news and tt_news_cat_mm. on the
second page/form the user should enter a number he gets from his usermail
and then there are some upload fields.

problem 1: how can i get the uid from tt_news into the mail?
###value_inserted_uid### is always 0, because the last db-insert is
uid_local and uid_foreign into tt_news_cat_mm (without an uid). i wrote a
finisher to store inserted_uid with a chosen name into
$this->gp['chosen_name'], because i need to store 3 entries in tt_address
and then their uids as keys in one tt_news item. i have tried to get the
tt_news_uid with this finisher into my mail (tried with
###value_submission_uid### and  ###submission_uid### but got nothing. (put s
raw ts at the end)


problem 2: depending on a chosen radiobox i would like to change some values
and some settings. a value for a tt_news item should be set to 1 instead of
0 and the settings for usermail to_email should be set to one of the 3
tt_adddress-items (depending on chosen radiobox). i have tried to use
[globalVar = GP:formhandler|einreicher=1] and set the new values, but
without success...

hopefully someone can help me!

greets
carmen



finishers {
         1 {
            class = Tx_Formhandler_Finisher_DB
            config {
                table = tt_address
                key = uid
                fields { ... }
            }
        }
        2 {
            class = Tx_MyExt_Finisher_StoreInsertedUID
            config.field = object_address
        }
        3 {
            class = Tx_Formhandler_Finisher_DB
            config {
                table = tt_address
                key = uid
                fields { ... }
            }
        }
        4 {
            class= Tx_MyExt_Finisher_StoreInsertedUID
            config.field = client_address
        }

        5 {
            class = Tx_Formhandler_Finisher_DB
            config {
                table = tt_address
                key = uid
                fields { ... }
            }
        }
        6 {
            class = Tx_MyExt_Finisher_StoreInsertedUID
            config.field = architect_address
        }

        7 {
            class = Tx_Formhandler_Finisher_DB
            config {
                table = tt_address
                key = uid
                fields { ... }
            }
        }
        8 {
            class = Tx_MyExt_Finisher_StoreInsertedUID
            config.field = builder_address
        }

        9 {
            class = Tx_Formhandler_Finisher_DB
            config {
                table = tt_news
                key = uid
                fields {
                     ...
                     tx_mdlrbuildings_building_ttaddress {
                        mapping = TEXT
                        mapping.data = GPvar:formhandler|object_address
                    }
                    tx_mdlrbuildings_client_ttaddress {
                        mapping = TEXT
                        mapping.data = GPvar:formhandler|client_address
                    }
                    tx_mdlrbuildings_architect_ttaddress {
                        mapping = TEXT
                        mapping.data = GPvar:formhandler|architect_address
                    }
                    tx_mdlrbuildings_builder_ttaddress {
                        mapping = TEXT
                        mapping.data = GPvar:formhandler|builder_address
                    }
                    ....
                 }
            }
        }
        10 {
            class = Tx_MyExt_Finisher_StoreInsertedUID
            config.field = submission_uid
        }

        11 {
            class = Tx_Formhandler_Finisher_DB
            config {
                table = tt_news_cat_mm
                fields { ... }
            }
        }
        12.class = Tx_Formhandler_Finisher_Mail
        12.config {
            admin { ... }
            user { ... }
        }

        13.class = Tx_Formhandler_Finisher_SubmittedOK
        13.config.returns = 1
    }


More information about the TYPO3-english mailing list