Question

I have 3 tables:

  • item
  • country
  • region

region is an irre-field in country. In item i want to have an selectbox where you can choose a country and only if this country has regions there shall appear a new selectbox with the regions related to the country.

If the countries were fix i could use $TCA['item']['ctrl']['type'] = 'country'; and $TCA['item']['types'] to reload the backend and display the region selectbox if needed.

Is there any possibility in doing this with a non-fix country list checking if it has relations?

An option to hide the region-field if it has no options would solve the problem as well.

Was it helpful?

Solution

I fear this is not easily possible. You can of course create a USER element and implement the logic yourself. http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/User/Index.html

You could also play around with the "type" column property from the ctrl section, but it sounds you already tried this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top