#106892Make value attributes of f:form.countrySelect viewhelper configurable
Description
The f:form.countrySelect viewhelper renders the country two letter iso codes as option values. It would be great if there would be a parameter to set the option values (e.g. country name in english or german instead of the two letter iso code).
I think this issue belongs to fluid and form extension. Form extension should have this parameter settable in the editor.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
Files 2
History 9
-
Garvin Hicking commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-06-16T13:58:39+00:00" > 06/16/25, 13:58 </span> -
Bernhard Eckl commented <span data-processor="relativetime" data-value="2025-06-16T15:09:21+00:00" > 06/16/25, 15:09 </span>
My use case is I use the form framework and need the country name in EmailToReceiver finisher instead of the country code.
Another reason to make it configurable with a parameter: sometimes the three letter iso code is used for example table fe_users and femanager with static_info_tables.
The parameter could be optional, so if parameter is not configured it works with classical two letter iso code.
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2025-06-17T18:06:14+00:00" > 06/17/25, 18:06 </span>
Hmm.
I agree to Garvin that changing the value may lead to unexpected data being sent to the server triggered by integrators who don’t exactly know what they are doing. From this point of view, it is more safe for the framework to not allow “abusing” the VH to submit different value types.
In case something different is needed in an application, a custom view helper may be a better choice. What do you think?
-
Garvin Hicking commented and changed attached Screenshot 2025-06-18 at 09.34.22.png attached Screenshot 2025-06-18 at 09.34.11.png <span data-processor="relativetime" data-value="2025-06-18T07:35:51+00:00" > 06/18/25, 07:35 </span>
Bernhard Eckl wrote in #note-2:
> My use case is I use the form framework and need the country name in EmailToReceiver finisher instead of the country code.I’ve just tried this, but for me the Finishers properly resolve the select dropdown value to the actual label, see screenshots. So the proper country name should already be displayed there?
-
Bernhard Eckl commented <span data-processor="relativetime" data-value="2025-06-18T14:37:39+00:00" > 06/18/25, 14:37 </span>
@lolli: I think a config option does not hurt somebody if the current behaviour is the default when parameter is not set. And people who set this know what they do. I think it is not uncommon that the country name or three letter code is needed.
@ghi: On my system I only see the two letter code. Did you use {variables}?
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-06-18T15:43:20+00:00" > 06/18/25, 15:43 </span>
> @ghi: On my system I only see the two letter code. Did you use {variables}?
I used the default handling and not configure/set any custom templates or variables.
This leads me to think you may use custom mail templages and might access the variables differently? Please try with a vanilla setup to find this out.
-
Garvin Hicking changed Related to #106903 <span data-processor="relativetime" data-value="2025-06-20T12:37:03+00:00" > 06/20/25, 12:37 </span>
-
Bernhard Eckl commented <span data-processor="relativetime" data-value="2025-06-20T17:20:36+00:00" > 06/20/25, 17:20 </span>
Okay, I will try. But will take some time, I will be in vacation a few months…
-
Garvin Hicking commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-04-14T19:32:03+00:00" > 04/14/26, 19:32 </span>Closing now, unless your vacation is over ;)
The idea here is that the values always NEED to be ISO codes to be used ad a uid. This is no longer “stable” if you use different values.
You can affect the output via the labels and the Country API (https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Global/Form/CountrySelect.html#typo3-fluid-form-countryselect-example-optionlabelfield).
Could you tell your use case why you must change the value instead of using the labels here? Maybe the solution would be to use Finishers/converters that map ISO values to language dependant output (labels). I haven’t used the ext:form integration with this, but using extbase/fluid with the TCA type “country” in v14 allows exactly this kind of output-mapping.