It looks like the flags are linked to the Country field, so whichever country the user selects will display the corresponding flag.
However the ip2cc module's advantage is that it finds the location of the user by his IP address.
@gauvin, will it be possible to do the same in this module; send the IP to ip2cc, get the country flag and display it.

That's because people might choose the wrong country which defeats the purpose. Also we can avoid having the country field, hence one step less for the user.

thanks!

Comments

klonos’s picture

If this will ever get to be implemented, please consider making it optional. The reason is because there are situations where a person signing the petition might be doing so while being temporarily in another country (like say college students), but might want to represent another (their country of birth).

So, I believe there should be a setting to that (radio buttons) with the following options:

- Use ip2cc to automatically set country and flags (hide country selection drop-down).
- Use ip2cc, but also allow the signer to edit fetched/guessed country.
- Country manually selected by the signer.

The two first options should be shown only if the IP to Country module is installed & enabled.

What do you think?

vako’s picture

I agree, but these options should be chosen only by the administrator and not the user, since the admin should decide to allow users change the flag, depending on what type of comment is expected.
e.g.: Sometimes if people are looking for feedback only by people living in a specific country at that moment, allowing the user to change the flag will result in faulty statistics.

klonos’s picture

I agree on that one too...

Perhaps there could be a 'Configure country selection' permission associated with the Petition Node module. This way there can be an option to allow only members of a certain role to do so (as opposed to limiting this permission to the site admin user only).