DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Using static_info_tables for country selection

Basics

  • Install Extension static_info_tables
  • Install Extension static_info_tables(_de)(_fr)(_pl) etc… for localized countrynames
  • Import Records of the extensions via Extension Manager (see manual of static_info_tables)
  • Clear Cache
  • Copy all Partials from femanager to a fileadmin folder
  • Set the new Partial Path via Constants: plugin.tx_femanager.view.partialRootPath = fileadmin/femanager/Partials/
  • Open Partial Fields/Country.html and activate static_info_tables (see notes in HTML-File)

Details for Partial Country.html

The idea is very simple. You can change the “options Attribute” of the form.select ViewHelper:

<femanager:form.select
        id="femanager_field_country"
        property="country"
        options="{femanager:Form.GetCountriesFromStaticInfoTables()}"
        defaultOption="{f:translate(key:'pleaseChoose')}"
        class="input-block-level"
        additionalAttributes="{femanager:Validation.FormValidationData(settings:'{settings}',fieldName:'country')}" />

The GetCountriesFromStaticInfoTables-ViewHelper

Possible options for this ViewHelper are:

Name Description Default Value Example Value
key

Define the Record Column of static_countries table which should be used for storing to fe_users country

Note: Please use lowerCamelCase Writing for Fieldnames

isoCodeA3 isoCodeA2
value

Define the Record Column of static_countries table which should be visible in selection in femanager

Note: Please use lowerCamelCase Writing for Fieldnames

officialNameLocal shortNameFr
sortbyField

Define the Record Column of static_countries which should be used for a sorting

Note: Please use lowerCamelCase Writing for Fieldnames

isoCodeA3 shortNameDe
sorting Could be ‘asc’ or ‘desc’ for Ascending or Descending Sorting asc desc

Some Examples are:

{femanager:Form.GetCountriesFromStaticInfoTables(key:'isoCodeA2',value:'shortNameDe')}
{femanager:Form.GetCountriesFromStaticInfoTables(key:'isoCodeA2',value:'shortNameFr',sortbyField:'shortNameFr')}
{femanager:Form.GetCountriesFromStaticInfoTables(key:'isoCodeA3',value:'isoCodeA3',sortbyField:'isoCodeA3',sorting:'asc')}