This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Logic problem


  1. tm2000
    Member

    Hi There,

    I have a form where the user can choose from a list of countries.
    If they choose a country within Europe, the are shown field A,
    but if they choose a country within Africa, they are shown Field C.

    So what I want to do is create logic to show Field A if it contains a European country - which means I need to list each country within Europe.
    So, the logic needs to be contains Austria OR Paris OR Venice OR ...... and so on.

    The only way i can do this is to crate individual rules for each country - but I have hundreds - is there no way to add logic that I can ask if it contains ANY of the country names from one piece of logic?

    Thanks!
    Andy

    Posted 9 years ago #
  2. williamansley
    Member

    @tm2000: I suppose this is an ugly solution, but if you added the continent to the end of the name of each country in your list, you could create a very simple logical statement. For example your lists would be:

    "Austria (Europe)", France (Europe)", "Italy (Europe)", Spain (Europe)", etc.

    and

    "Algeria (Africa)", "Gambia (Africa)", "Rwanda (Africa)", etc.

    Then you would only have to test whether the user's choice contained "Europe" or "Africa". You could hide the repeated part using inline CSS if you really don't want it to show and I assume the logic would still work, although you'd have to test it.

    Posted 9 years ago #

RSS feed for this topic

Reply