1
votes

Using Typo3 8.7.4/Powermail 3.21.2

I'm pretty new to Typo3, so I have no clue if this is even the right way to do it, but heres my problem:

On the site there are several subpages with images/descriptions of articles on them. Every article has an UID stored in the image title (dont ask me why). When an image is clicked it links to another page with a powermail mailform.

In this form there's a textfield for the UID which should automatically fill with the UID in the image title so the user doesn't have to do it manually. That essentially it.

I know you can prefill a field with a value or placeholder, but should I even use a textfield or use TS instead? And what should I add to the image link for the UID to get posted to the form?

Or am I doing this completely wrong? All help appreciated, thank you and have a nice day!

2

2 Answers

0
votes

You can Do like This.

plugin.tx_powermail.settings.setup.prefill {
    position = CONTENT // Here Position is your powermail form fields
    position {
       table = Your tables
       select {
            selectFields = title
            andWhere.data = GP:title  // Pass your url parameters
            andWhere.wrap = uid=|
            pidInList = 108 // Added Your Pid 
       }
       renderObj = TEXT
       renderObj.field = title
    }
}
0
votes

There are several ways of prefilling form fields in powermail (look at the manual https://docs.typo3.org/typo3cms/extensions/powermail/ForAdministrators/BestPractice/PrefillField/Index.html) and I would say that there is no wrong way. Just choose the right one for your needs.