[TYPO3-english] Formhandler static_countries default country

Tony Lush tlush at advancewm.com
Thu Apr 30 05:05:15 CEST 2015


In Formhandler I am trying to define a default country to appear in a select box generated from static_countries.

The select box is generated with the typoscript:

plugin.Tx_Formhandler.settings.predef.contact {
// ...
  markers{
    countries = CONTENT
    countries {
      table = static_countries
      select {
        pidInList = 0
        orderBy = cn_short_en
        selectFields = cn_iso_2,cn_short_en
      }
      renderObj = COA
      renderObj {
        10 = TEXT
        10.wrap = <option value="|"
        10.field = cn_iso_2
        12 = TEXT
        12.wrap = ###selected_country_|###
        12.field = cn_iso_2
        13 = TEXT
        13.wrap = >|</option>
        13.field = cn_short_en
      }
    }
  }
// ...
} 

I have set the default country in static_countries' constants, which had no impact on formhandler.

And I tried using a preprocessor without success.

 #  Preprocessors configuration
  preProcessors {
    1.class = Tx_Formhandler_PreProcessor_LoadDefaultValues
       1.config {          
         #Prefill field in step 1
         1 {
            country.defaultValue = TEXT
            country.defaultValue.data = US
         }
       }
  }

Has anyone a suggestion?

Kind regards -- Tony
-- 
Tony Lush
AdvanceWebMarketing.com


More information about the TYPO3-english mailing list