?
avatar thinkerytim
thinkerytim
21 Oct 2014

When using the list form field type (http://docs.joomla.org/List_form_field_type) the interpreter seems to fail to properly parse commas:

<field name="number_format" type="list" class="inputbox" label="number format" description="" size="1" default="0">
    <option value="0">19.999,00</option>
    <option value="1">19,999.00</option>
</field>

This results in a select list showing the options like this:

download

avatar thinkerytim thinkerytim - open - 21 Oct 2014
avatar jissues-bot jissues-bot - change - 21 Oct 2014
Labels Added: ?
avatar Bakual
Bakual - comment - 21 Oct 2014

This is because the list formfield tries to translate the option text. Since the comma isn't a valid constant string, this is stripped and fails.

There are two ways you could solve this:
Either create your own custom formfield which doesn't translate the option texts, or make the options a translated string. The latter would be preferred since the value format you use is language specific already. In Switzerland we would write it as 19'000,00.

If someone wants to write a solution, one could add an attribute to the option (or the field) which says to not translate the options. However I don't know it is worth the effort.

avatar thinkerytim
thinkerytim - comment - 21 Oct 2014

Thanks Bakual-- I did wonder about that and noticed the language string workaround. I'll just use that for now.

avatar thinkerytim thinkerytim - close - 21 Oct 2014
avatar thinkerytim thinkerytim - change - 21 Oct 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-10-21 19:33:03

Add a Comment

Login with GitHub to post a comment