{"id":250669,"date":"2025-09-16T09:41:10","date_gmt":"2025-09-16T09:41:10","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/forgepress-gf-country-choice-rules\/"},"modified":"2025-09-16T17:31:36","modified_gmt":"2025-09-16T17:31:36","slug":"forgepress-country-choice-rules-for-gravity-forms","status":"publish","type":"plugin","link":"https:\/\/ja.wordpress.org\/plugins\/forgepress-country-choice-rules-for-gravity-forms\/","author":23358462,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3.2","stable_tag":"1.3.2","tested":"6.8.5","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"ForgePress Country Choice Rules for Gravity Forms","header_author":"ForgePress","header_description":"Hide\/block specific Gravity Forms choices by visitor country, with optional VPN\/Proxy handling (warn\/force\/block), provider APIs, and an admin repeater UI.","assets_banners_color":"","last_updated":"2025-09-16 17:31:36","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":279,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.3.2":{"tag":"1.3.2","author":"forgepress","date":"2025-09-16 17:31:36"}},"upgrade_notice":{"1.3.0":"<p>Renamed to <strong>ForgePress Country Choice Rules for Gravity Forms<\/strong>. If you used a previous ForgePress build, your settings will migrate automatically.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.3.2"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"<strong>Rules UI<\/strong> \u2013 Add rules per form\/field with countries and optional fallback","2":"<strong>VPN\/Proxy settings<\/strong> \u2013 Choose action, set forced country, optional API and messages","3":"<strong>Frontend<\/strong> \u2013 Choices removed per country; fallback auto-selected (if configured)"}},"plugin_section":[],"plugin_tags":[23078,130308,3751,4124,1655],"plugin_category":[49],"plugin_contributors":[247939],"plugin_business_model":[],"class_list":["post-250669","plugin","type-plugin","status-publish","hentry","plugin_tags-choices","plugin_tags-conditional-logic","plugin_tags-country","plugin_tags-geolocation","plugin_tags-gravity-forms","plugin_category-maps-and-location","plugin_contributors-forgepress","plugin_committers-forgepress"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/forgepress-country-choice-rules-for-gravity-forms.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>ForgePress Country Choice Rules for Gravity Forms<\/strong> lets you define rules that remove specific <strong>choices<\/strong> (radio, dropdown, checkbox options) for visitors from selected countries. This happens <strong>server-side<\/strong> (secure), and you can configure a <strong>fallback choice<\/strong> to auto-select when an option is removed.<\/p>\n\n<h3>Highlights<\/h3>\n\n<ul>\n<li><strong>Per-country choice blocking<\/strong> for radio, dropdown, and checkbox fields<\/li>\n<li><strong>Multi-form \/ multi-field<\/strong> rules (simple repeater UI)<\/li>\n<li><strong>Fallback choice<\/strong> (optional) if a blocked option is removed<\/li>\n<li><strong>Server-side filtering<\/strong> (not just CSS\/JS hiding)<\/li>\n<li><strong>Optional VPN\/Proxy handling<\/strong>:<br \/>\n\n<ul>\n<li><em>Do nothing<\/em>  <\/li>\n<li><em>Show warning<\/em> message  <\/li>\n<li><em>Force a default country<\/em> for rule evaluation  <\/li>\n<li><em>Block submission<\/em> with a custom message<\/li>\n<\/ul><\/li>\n<li><strong>Cloudflare aware<\/strong> (<code>CF-IPCountry<\/code>) with 1h caching for IP lookups<\/li>\n<li>Lightweight and admin-friendly<\/li>\n<\/ul>\n\n<blockquote>\n  <p>This plugin is <strong>not<\/strong> affiliated with or endorsed by Gravity Forms. It simply integrates with Gravity Forms via its standard hooks.<\/p>\n<\/blockquote>\n\n<h3>How it works (in short)<\/h3>\n\n<ol>\n<li>You add rules: <strong>Form ID + Field ID + Choice Text\/Value + Countries<\/strong> (+ optional fallback).<\/li>\n<li>On render\/validation, the plugin detects the visitor <strong>country<\/strong>.<\/li>\n<li>If a rule matches, the corresponding <strong>choice(s) are removed<\/strong> and an optional <strong>fallback<\/strong> is selected.<\/li>\n<\/ol>\n\n\n\n<h3>External Services &amp; Data Flow (Guideline 6)<\/h3>\n\n<p>This plugin may use third-party services to determine the visitor\u2019s country and (optionally) detect VPN\/Proxy usage.<\/p>\n\n<ul>\n<li><p><strong>Cloudflare (if your site is on Cloudflare):<\/strong><br \/>\nWe read the <code>CF-IPCountry<\/code> header provided by Cloudflare. No outbound request is made by this plugin.<br \/>\nPrivacy: https:\/\/www.cloudflare.com\/privacypolicy\/<\/p><\/li>\n<li><p><strong>ipapi.co (free)<\/strong> <em>(default geolocation when Cloudflare is not present)<\/em>:<br \/>\nThe plugin requests <code>https:\/\/ipapi.co\/{IP}\/json\/<\/code> to map visitor IP \u2192 country.<br \/>\n<strong>Data sent:<\/strong> visitor IP only.<br \/>\n<strong>Retention:<\/strong> result cached in WordPress for 1 hour.<br \/>\nPrivacy: https:\/\/ipapi.co\/privacy\/<\/p><\/li>\n<li><p><strong>Optional VPN\/Proxy checks (opt-in by the site admin):<\/strong><\/p>\n\n<ul>\n<li><strong>ipregistry.co<\/strong> (if an API key is configured):<br \/>\n<strong>Data sent:<\/strong> visitor IP to check proxy\/VPN indicators.<br \/>\nPrivacy: https:\/\/ipregistry.co\/privacy<\/li>\n<li><strong>ipapi.com PRO<\/strong> (if an API key is configured):<br \/>\n<strong>Data sent:<\/strong> visitor IP with <code>security=1<\/code> to check VPN\/Proxy\/Tor.<br \/>\nPrivacy: https:\/\/ipapi.com\/privacy<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>No form entries or personal form fields are sent to these providers. Admins can <strong>disable<\/strong> optional VPN checks entirely.<\/p>\n\n<p><strong>GDPR\/Privacy:<\/strong> Only an IP address may be sent to the selected provider(s) to derive country\/VPN status. You should disclose this in your site privacy policy if enabled.<\/p>\n\n\n\n<h3>Notes on Naming \/ Trademarks<\/h3>\n\n<p>This is an independent plugin <strong>for<\/strong> Gravity Forms and is not affiliated with or endorsed by Gravity Forms. The name and readme make this relationship clear.<\/p>\n\n\n\n<h3>Features in Detail<\/h3>\n\n<ul>\n<li><strong>Rule builder UI<\/strong> under <em>Settings \u2192 ForgePress Country Choice Rules<\/em><br \/>\n\n<ul>\n<li>Add multiple rows; each row targets a <strong>Form ID + Field ID<\/strong>, the <strong>choice label\/value<\/strong>, and a list of <strong>countries (ISO-2)<\/strong>.  <\/li>\n<li>Optionally set a <strong>Fallback choice<\/strong> to auto-select if the blocked option is removed.<\/li>\n<\/ul><\/li>\n<li><strong>Runtime enforcement<\/strong><br \/>\n\n<ul>\n<li>Choices are removed on <code>gform_pre_render<\/code> and validated on <code>gform_validation<\/code>.  <\/li>\n<li>If a blocked value is posted manually, validation fails with a clear message.<\/li>\n<\/ul><\/li>\n<li><strong>VPN\/Proxy handling<\/strong><br \/>\n\n<ul>\n<li>Admin can choose: <em>Do nothing<\/em>, <em>Show warning<\/em>, <em>Force country<\/em>, or <em>Block submission<\/em>.  <\/li>\n<li>Works without an API key (heuristics). With a key (ipregistry\/ipapi PRO), detection is more accurate.<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install and activate <strong>Gravity Forms<\/strong> first.<\/li>\n<li>Upload the plugin ZIP and activate <strong>ForgePress Country Choice Rules for Gravity Forms<\/strong>.<\/li>\n<li>Go to <strong>Settings \u2192 ForgePress Country Choice Rules<\/strong> to add rules.<\/li>\n<li>(Optional) Configure <strong>VPN\/Proxy handling<\/strong> and provider API key(s).<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20this%20work%20without%20javascript%3F'><h3>Does this work without JavaScript?<\/h3><\/dt>\n<dd><p>Yes. Filtering is server-side.<\/p><\/dd>\n<dt id='what%20happens%20if%20the%20user%20is%20on%20a%20vpn%3F'><h3>What happens if the user is on a VPN?<\/h3><\/dt>\n<dd><p>By default, geolocation is based on the detected IP, which may reflect the VPN\u2019s exit node. You can enable <strong>VPN\/Proxy handling<\/strong>: show a warning, force a default country for rule evaluation, or block the submission. For higher accuracy, add an API key for <em>ipregistry<\/em> or <em>ipapi PRO<\/em>.<\/p><\/dd>\n<dt id='how%20do%20i%20find%20field%20ids%20and%20choice%20values%3F'><h3>How do I find Field IDs and Choice values?<\/h3><\/dt>\n<dd><p>In the Gravity Forms editor, each field shows an <strong>ID<\/strong>. Choices have <strong>text<\/strong> and <strong>value<\/strong>; match either (the plugin compares case-insensitively).<\/p><\/dd>\n<dt id='is%20this%20compatible%20with%20caching%3F'><h3>Is this compatible with caching?<\/h3><\/dt>\n<dd><p>Yes. Country detection is per-request and cached (IP result for 1 hour). For full-page caching, ensure your CDN\/proxy varies cache by country (or bypass cache on form pages) if you need per-country differences on the same URL.<\/p><\/dd>\n<dt id='is%20there%20a%20performance%20impact%3F'><h3>Is there a performance impact?<\/h3><\/dt>\n<dd><p>Minimal. A single fast IP lookup is cached; Cloudflare country header avoids lookups entirely.<\/p>\n\n<\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h3>1.3.0<\/h3>\n\n<ul>\n<li>Initial public release under the new name\/slug.<\/li>\n<li>Country-based choice filtering with fallback selection.<\/li>\n<li>Optional VPN\/Proxy handling (warn\/force\/block).<\/li>\n<li>Cloudflare header + ipapi.co fallback with 1h caching.<\/li>\n<li>Admin UI for multi-form\/multi-field rules.<\/li>\n<\/ul>","raw_excerpt":"Country-based choice rules for Gravity Forms. Hide or replace field choices per country, with optional VPN\/Proxy handling.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/250669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=250669"}],"author":[{"embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/forgepress"}],"wp:attachment":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=250669"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=250669"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=250669"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=250669"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=250669"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=250669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}