By Aikaterini Koutsouflaki on Sunday, 11 November 2018
Posted in Technical Issues
Replies 10
Likes 0
Views 726
Votes 0
Hello
On our site we need another instance of address field that will show points of interest for each country.
We also need the address fields as they are. (Country / State / etc) so we can not change the regions database.

Is there a way to clone the social_regions database table name it social_interestpoints and set the Standard Address field populate data from social_interestpoints databaase? This would be a good solution.

If not how can we have a field that will populate data from database?

I have seen some related posts on the helpdesc, but they are old (2014) and probably you have resolved the issue of creating dynamic conditional dropdown fields.
Hi Aikaterini,
Is there a way to clone the social_regions database table name it social_interestpoints and set the Standard Address field populate data from social_interestpoints databaase?
May I know what are these 'interest points' you are referring to? The regions database is only designed for country and state. So even if it is cloned, it wouldn't be able to populate the address line 1 and 2.
If not how can we have a field that will populate data from database?
Not sure what kind of field you are referring to. If it's fields like the dropdown field, you can actually add the entries from the backend. Moreover, you can also use conditional fields to show the field when a certain country is chosen in the country field.
·
Monday, 12 November 2018 11:18
·
0 Likes
·
0 Votes
·
0 Comments
·
May I know what are these 'interest points' you are referring to? The regions database is only designed for country and state. So even if it is cloned, it wouldn't be able to populate the address line 1 and 2.


Example:

First step:
Copy the social_regions database table, rename it to social_ports, and replace the states of each country with ports of each country.

Second step:
Create a new address field in registration workflow and set it to populate values from social_ports. In such case the the address line 1 and 2 are not needed and we can set them not to be required and not to be visible anywhere. But we do not have an option to select anything else than "Regions Database" and "File".


Not sure what kind of field you are referring to. If it's fields like the dropdown field, you can actually add the entries from the backend. Moreover, you can also use conditional fields to show the field when a certain country is chosen in the country field.


Example according to this suggestion:

You create a dropdown field with all the countries of the world (Let's say 150 countries)

For each country you create a conditional multiselect field.

So in each user registration workflow (we have 18 registration workflows) you need 151 more fields if you want the user to specify the ports of his country he can serve.

Have i understood right the "add the entries from the backend" solution?

Thank you in advance.
·
Monday, 12 November 2018 13:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Aikaterini,

Yes the backend method is something like that. But now that you mentioned it, it is not a viable solution because of the huge amount of fields to create.

Currently I am not sure where you are retrieving the list of social_ports. But if you have a json file, it is possible to modify the address custom field to get the values from the ports.json file when you choose a country, similar to how the list of states are populated.

This method does not require you to create new table in the database. Basically the ports field will replace the states but with different sets of data. You may have to modify a few files.
·
Monday, 12 November 2018 18:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes using json file would be a solution.

So...

I created a new address field (Data Source = file). The Data Source .json file is yet untouched. But the States values are not populated from the .json file.

Please check the attached photo for details.

Thank you!
·
Monday, 12 November 2018 20:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Aikaterini,

Changing the source to file is not enough to maintain both states and the new field.

You would have to do modify the code on some files in order to populate the list of ports in place of the state field and vice versa.
·
Tuesday, 13 November 2018 15:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you for your reply.

Can i get a clear answer finally?

Is it possible to have a custom field to populate values from database and each value activates an other conditional field with more values from database?

I have explained what i need.

Can i have it with EasySocial?
·
Tuesday, 13 November 2018 16:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Aikaterini,

It is possible if you hack EasySocial files.

It is not possible if you do not hack EasySocial files.
·
Tuesday, 13 November 2018 16:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Understood!

But this is not an answer (talking about me) that suits a nice project like EasySocial.

Even if i hack EasySocial files, then i will have to hack EasySocial again on the next update!

On the other hand... most joomla users are not programmers to be able to hack EasySocial files. That's why plug & play plugins exist for joomla components.

Create the plugins and sell them!

The dynamic custom fields creation option for example is asked here in your forum since 2014 but nobody is giving a solution!
Post URL: https://stackideas.com/forums/populating-custom-fields-dynamically-from-a-database-table

while you know that community builder offers these functions out of the box.

All these are my thoughts. Wish they become the start point for consideration for the developing team.

Thank you
·
Tuesday, 13 November 2018 17:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for the feedback Aikaterini.

I believe no feature request was created in 2014. Feel free to create a feature request for this in the feature request category if you haven't done so. That way we are able to track them and gauge the demand of the feature.
·
Tuesday, 13 November 2018 17:53
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post