[TYPO3-english] Powermail field uid in TS object

Sergio Catalá scatala.enet at gmail.com
Fri Apr 25 11:46:03 CEST 2014


Hi list,

I am using latest powermail version (2.0.13) and wanted to output a 
radio input in the frontend to show my salutations (Mr, Mrs,...). 
Instead of using a radio input field, I use a Typoscript field (called 
"lib.salutations") for my form, and I pick up the salutations saved in a 
table (under PID=1).

Here is what I have:

lib.salutations = COA_INT
lib.salutations {
     10 = CONTENT
     10 {
         table = tx_extension_domain_model_salutation
         select {
             pidInList = 1
             orderBy = sorting ASC
         }
         renderObj = COA
         renderObj {
             10 = COA
             10 {
                 10 = TEXT
                 10 {
                     field = uid
                     wrap = <label for="salutation|" class="inline left">
                 }
                 20 = TEXT
                 20 {
                     field = uid
                     wrap = <input id="salutation|" type="radio"
                 }
                 30 = TEXT
                 30 {
                     value = 36
                     wrap = name="tx_powermail_pi1[field][|]"
                 }
                 40 = TEXT
                 40 {
                     field = uid
                     wrap = value="|" />
                 }
                 50 = TEXT
                 50 {
                     field = name
                     noTrimWrap = | | </label>|
                 }
             }
         }
     }
}

It works like a charm, displaying my salutations, but the thing is I 
wanna do it more generic for all forms that use this same TS for a TS field.
If you see TS object "lib.salutations.10.renderObj.10.30", I am using 
the value "36" directly. I would like to take in this object: the uid of 
the powermail field. Anyone knows how to do that?

Thanks in advance,
Sergio



More information about the TYPO3-english mailing list