This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Only two countries
Started 14 years ago by paulbrennan | 3 posts |
-
Hi there,
My question is simple - i only want to show US and Canada in country list. This was kind of discussed in another post but in that case it was conditional on something - in my case there is no condition, just need to eliminate the other countries.
thanks,
Paul
Posted 14 years ago # -
To use the built in address field. You would have to modify the view-functions.php file, function display_address($element), to either only show the two countries or to do a select case to only show the two countries based on the form.
However, from looking at this real quick it does not seem like the form information is available. It looks like the function only knows the element and not what form it is attached to so I am not sure you can do the select case.
It would probably be easier to build you own address block using the standard components.
Posted 14 years ago # -
If you only need to display two countries, without any conditional on something, then it would be very easy to do.
Simply edit your "includes/view-functions.php" file.
Search around line 962 - 1351.There you'll find a list of countries. Simply delete the rest of the countries you don't want to display. Each country has a pair, so make sure to delete both.
MachForm Founder
Posted 14 years ago #
Reply
You must log in to post.