10 years ago
3
Topic
Hi

In a new multi sites project we need to specify for each site some lists of values that should be used to generate site-based selection lists.

For example the option can be the list of countries. For each site we define, in the site configuration, the list of countries that can be managed.

Hence we created a simple selection field (as stated here) with all the countries. For each site we selectd some countries.


Let's say SITE1 option is : French  - England - Italy and SITE2 option is USA- Germany- Brasil

What I am trying to do is to create, for each site, a selection list that ONLY displays the item selected in the site option. 
This selection list should have French - England - Italy as possible values for SITE1 and USA- Germany- Brasil for SITE2


I know I can retrieve the values of each site option with this plugin but how can I feed a select dynamic field with these values ?

Is there any way without php code field?

thanks

cyril

Get a VIP membership
10 years ago
0
Level 1
That´s a good question, maybe with a system plugin that replace a *markup* with value from multi-site option and then you can create a conditional select list.
10 years ago
0
Level 1
Hi Codigo, can you explain why a system plugin please ? Where and how will we use it in a form please ? 
thanks

cyril
10 years ago
0
Level 1
Hi again

Actually our problem comes from the site options storage. This is a JSON storage which is good for fast processing but bad for special queries. 
It's not easy to build SQL queries with Json items. You can retrieve the whole field but can't make your own queries (for example in a select dynamic field) on some elements of the json fields.

It would have been so much easier if the site options had been stored in a more separate storage

cyril
Get a Book for SEBLOD