typo3typo3-9.xpowermail

powermail should update a `pages`-field


I want to use powermail (7.4.0) to give special page visitors the option to modify a field in the current pages record.

my setting so far:

plugin.tx_powermail.settings.setup {
    dbEntry {
        1 {
            _enable = TEXT
            _enable.value = 1            

            _table = TEXT
            _table.value = pages            

            uid = TEXT
            uid.data = TSFE:id            

            description = TEXT
            description.field = abnahmestatus
        }
    }
    prefill {
        abnahmestatus = TEXT
        abnahmestatus.data = TSFE:description
    }
}

How can I get powermail to update the record (instead of inserting)?

How can I prefill the input field with the current value from the pages field?


Solution

  • Answer 1: update instead of insert:

    I missed the line

    _ifUnique.uid = update
    

    from the manual example.


    Answer 2:

    I inserted {abnahemstatus} which was not helpfull as it overwrote the typoscript prefill. so:

    1. no value in prefill_value of the field definition
    2. the correct definition is abnahmestatus.data = page:description (TSFE is obsolete)