{"id":31,"date":"2025-02-13T02:34:42","date_gmt":"2025-02-13T02:34:42","guid":{"rendered":"https:\/\/www.djfroh.ca\/?page_id=31"},"modified":"2025-02-13T02:34:42","modified_gmt":"2025-02-13T02:34:42","slug":"golf-distance-calculator","status":"publish","type":"page","link":"https:\/\/www.djfroh.ca\/index.php\/golf-distance-calculator\/","title":{"rendered":"Golf Distance Calculator"},"content":{"rendered":"\n<style>@media (max-width:480px){#cp_calculatedfieldsf_pform_1{min-height:607px;}}@media (min-width:1024px){#cp_calculatedfieldsf_pform_1{min-height:604px;}}<\/style><form name=\"cp_calculatedfieldsf_pform_1\" id=\"cp_calculatedfieldsf_pform_1\" action=\"https:\/\/www.djfroh.ca\/index.php\/golf-distance-calculator\/\" method=\"post\" enctype=\"multipart\/form-data\" onsubmit=\"return fbuilderjQuery.fbuilder.doValidate(this);\" class=\"cff-form no-prefetch  cff-form-6 cp_cff_13\"  dir=\"ltr\" data-nonce=\"86a07e78db\">\n<input type=\"hidden\" name=\"cp_calculatedfieldsf_pform_psequence\" value=\"_1\" \/>\n<input type=\"hidden\" name=\"cp_calculatedfieldsf_id\" value=\"6\" \/>\n<input type=\"hidden\" name=\"cp_ref_page\" value=\"https:\/\/www.djfroh.ca\" \/>\n<pre style=\"display:none !important;\"><script data-category=\"functional\" type=\"text\/javascript\">form_structure_1=[[{\"form_identifier\":\"\",\"name\":\"fieldname1\",\"fieldlayout\":\"top_aligned\",\"shortlabel\":\"\",\"index\":0,\"ftype\":\"ftext\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"advanced\":{\"css\":{\"container\":{\"label\":\"Field container div tag\",\"rules\":{}},\"label\":{\"label\":\"Field label\",\"rules\":{}},\"input\":{\"label\":\"Input tag\",\"rules\":{}},\"help\":{\"label\":\"Instructions for users\",\"rules\":{}}}},\"title\":\"Yardage\",\"autocomplete\":\"off\",\"predefined\":\"\",\"predefinedClick\":false,\"required\":true,\"exclude\":false,\"accept_html\":false,\"readonly\":false,\"size\":\"small\",\"minlength\":\"\",\"maxlength\":\"\",\"equalTo\":\"\",\"regExp\":\"\",\"regExpMssg\":\"\",\"fBuild\":{},\"parent\":\"\"},{\"form_identifier\":\"\",\"name\":\"fieldname2\",\"fieldlayout\":\"default\",\"shortlabel\":\"\",\"index\":1,\"ftype\":\"fdropdown\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"advanced\":{\"css\":{\"container\":{\"label\":\"Field container div tag\",\"rules\":{}},\"label\":{\"label\":\"Field label\",\"rules\":{}},\"input\":{\"label\":\"Input tag\",\"rules\":{}},\"help\":{\"label\":\"Instructions for users\",\"rules\":{}},\"dropdown\":{\"label\":\"Dropdown\",\"rules\":{}}}},\"title\":\"Wind Direction\",\"size\":\"small\",\"required\":true,\"exclude\":false,\"accept_html\":false,\"toSubmit\":\"text\",\"merge\":0,\"choiceSelected\":\"\",\"select2\":false,\"multiple\":false,\"first_choice\":false,\"first_choice_text\":\"\",\"vChoices\":1,\"showDep\":false,\"choices\":[\"Calm\",\"Head Wind\",\"Tail Wind\"],\"optgroup\":[false,false,false],\"choicesVal\":[\"0\",\"1\",\"2\"],\"choicesDep\":[[],[],[]],\"fBuild\":{},\"parent\":\"\"},{\"form_identifier\":\"\",\"name\":\"fieldname3\",\"fieldlayout\":\"default\",\"shortlabel\":\"\",\"index\":2,\"ftype\":\"ftext\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"advanced\":{\"css\":{\"container\":{\"label\":\"Field container div tag\",\"rules\":{}},\"label\":{\"label\":\"Field label\",\"rules\":{}},\"input\":{\"label\":\"Input tag\",\"rules\":{}},\"help\":{\"label\":\"Instructions for users\",\"rules\":{}}}},\"title\":\"Wind Speed - kph\",\"autocomplete\":\"off\",\"predefined\":\"\",\"predefinedClick\":false,\"required\":true,\"exclude\":false,\"accept_html\":false,\"readonly\":false,\"size\":\"small\",\"minlength\":\"\",\"maxlength\":\"\",\"equalTo\":\"\",\"regExp\":\"\",\"regExpMssg\":\"\",\"fBuild\":{},\"parent\":\"\"},{\"form_identifier\":\"\",\"name\":\"fieldname4\",\"fieldlayout\":\"default\",\"shortlabel\":\"\",\"index\":3,\"ftype\":\"fdropdown\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"advanced\":{\"css\":{\"container\":{\"label\":\"Field container div tag\",\"rules\":{}},\"label\":{\"label\":\"Field label\",\"rules\":{}},\"input\":{\"label\":\"Input tag\",\"rules\":{}},\"help\":{\"label\":\"Instructions for users\",\"rules\":{}},\"dropdown\":{\"label\":\"Dropdown\",\"rules\":{}}}},\"title\":\"Elevation\",\"size\":\"small\",\"required\":true,\"exclude\":false,\"accept_html\":false,\"toSubmit\":\"text\",\"merge\":0,\"choiceSelected\":\"\",\"select2\":false,\"multiple\":false,\"first_choice\":false,\"first_choice_text\":\"\",\"vChoices\":1,\"showDep\":false,\"choices\":[\"Flat\",\"Uphill\",\"Downhill\"],\"optgroup\":[false,false,false],\"choicesVal\":[\"0\",\"1\",\"2\"],\"choicesDep\":[[],[],[]],\"fBuild\":{},\"parent\":\"\"},{\"form_identifier\":\"\",\"name\":\"fieldname5\",\"fieldlayout\":\"default\",\"shortlabel\":\"\",\"index\":4,\"ftype\":\"ftext\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"advanced\":{\"css\":{\"container\":{\"label\":\"Field container div tag\",\"rules\":{}},\"label\":{\"label\":\"Field label\",\"rules\":{}},\"input\":{\"label\":\"Input tag\",\"rules\":{}},\"help\":{\"label\":\"Instructions for users\",\"rules\":{}}}},\"title\":\"Elevation Amount - Feet\",\"autocomplete\":\"off\",\"predefined\":\"\",\"predefinedClick\":false,\"required\":true,\"exclude\":false,\"accept_html\":false,\"readonly\":false,\"size\":\"small\",\"minlength\":\"\",\"maxlength\":\"\",\"equalTo\":\"\",\"regExp\":\"\",\"regExpMssg\":\"\",\"fBuild\":{},\"parent\":\"\"},{\"dependencies\":[{\"rule\":\"\",\"complex\":false,\"fields\":[\"\"]}],\"form_identifier\":\"\",\"name\":\"fieldname6\",\"fieldlayout\":\"default\",\"shortlabel\":\"\",\"index\":5,\"ftype\":\"fCalculated\",\"userhelp\":\"\",\"audiotutorial\":\"\",\"userhelpTooltip\":false,\"tooltipIcon\":false,\"csslayout\":\"\",\"advanced\":{\"css\":{\"container\":{\"label\":\"Field container div tag\",\"rules\":{}},\"label\":{\"label\":\"Field label\",\"rules\":{}},\"input\":{\"label\":\"Calculated field\",\"rules\":{}},\"help\":{\"label\":\"Instructions for users\",\"rules\":{}}}},\"title\":\"Playing Distance\",\"_developerNotes\":\"\",\"predefined\":\"\",\"required\":false,\"exclude\":false,\"accept_html\":false,\"size\":\"small\",\"eq\":\"\\\/\\\/Calm Wind(0)\\n\\\/\\\/Head Wind(1)\\n\\\/\\\/Tail Wind(2)\\n\\\/\\\/Flat(0) - fieldname1\\n\\\/\\\/Uphill(1) - round(fieldname1 - round(fieldname5*0.3333))\\n\\\/\\\/Downhill(2) - round(fieldname1 + round(fieldname5*0.3333))\\n\\n    (function(){\\n        var head = round(fieldname1 + (fieldname1 * (round(fieldname3*0.6214)*0.008)));\\n        var tail = round(fieldname1 - (fieldname1 * (round(fieldname3*0.6214)*0.004)));\\n        var up = round(fieldname1 + round(fieldname5*0.3333));\\n        var down = round(fieldname1 - round(fieldname5*0.3333));\\n\\n        \\\/\\\/Calm and Flat\\n        if(fieldname2 == 0 && fieldname4 == 0) return fieldname1;\\n        \\n        \\\/\\\/Head wind and Flat\\n        if(fieldname2 == 1 && fieldname4 == 0) return head;\\n        \\\/\\\/Tail wind and Flat\\n        if(fieldname2 == 2 && fieldname4 == 0) return tail;\\n\\n        \\\/\\\/Calm and Uphill\\n        if(fieldname2 == 0 && fieldname4 == 1) return up;\\n        \\\/\\\/Calm and Downhill\\n        if(fieldname2 == 0 && fieldname4 == 2) return down;\\n\\n        \\\/\\\/Head wind and Uphill\\n        if(fieldname2 == 1 && fieldname4 == 1) return round(up + (up*((fieldname3*0.6214)*0.008)));\\n        \\\/\\\/Head wind and Downhill\\n        if(fieldname2 == 1 && fieldname4 == 2) return round(down - (down*((fieldname3*0.6214)*0.008)));\\n\\n        \\\/\\\/Tail wind and Uphill\\n        if(fieldname2 == 2 && fieldname4 == 1) return round(up + (up*((fieldname3*0.6214)*0.008)));\\n        \\\/\\\/Tail wind and Downhill\\n        if(fieldname2 == 2 && fieldname4 == 2) return round(down - (down*((fieldname3*0.6214)*0.008)));\\n\\n    })();\\n\",\"min\":\"\",\"max\":\"\",\"suffix\":\"\",\"prefix\":\"\",\"decimalsymbol\":\".\",\"groupingsymbol\":\"\",\"readonly\":true,\"currency\":false,\"noEvalIfManual\":true,\"formatDynamically\":false,\"dynamicEval\":true,\"hidefield\":false,\"validate\":false,\"fBuild\":{},\"parent\":\"\"}],{\"0\":{\"title\":\"Golf Distance Calculator\",\"titletag\":\"H2\",\"textalign\":\"default\",\"headertextcolor\":\"\",\"description\":\"Calculate the playing distance\",\"formlayout\":\"top_aligned\",\"formtemplate\":\"cp_cff_13\",\"evalequations\":1,\"evalequations_delay\":0,\"evalequationsevent\":2,\"direction\":\"ltr\",\"loading_animation\":0,\"autocomplete\":1,\"persistence\":0,\"animate_form\":0,\"animation_effect\":\"fade\",\"customstyles\":\"\",\"advanced\":{\"css\":{\"title\":{\"label\":\"Form title\",\"rules\":{}},\"description\":{\"label\":\"Form description\",\"rules\":{}},\"form\":{\"label\":\"Form area\",\"rules\":{}},\"buttons\":{\"label\":\"Form context buttons (Next page, Previous page, Submit)\",\"rules\":{}},\"buttons_hover\":{\"label\":\"Form context buttons hover\",\"rules\":{}}}}},\"formid\":\"cp_calculatedfieldsf_pform_1\"}];<\/script><\/pre>\n<div id=\"fbuilder\">\n\t\t<div id=\"fbuilder_1\">\n\t\t<div id=\"formheader_1\"><\/div>\n\t\t<div id=\"fieldlist_1\"><\/div>\n\t\t<div class=\"clearer\"><\/div>\n\t<\/div>\n<\/div>\n\t<div class=\"clearer\"><\/div>\n\t<input type=\"hidden\" id=\"_cpcff_public_nonce\" name=\"_cpcff_public_nonce\" value=\"5f0d00bd09\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/index.php\/wp-json\/wp\/v2\/pages\/31\" \/><\/form>\n\t\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-31","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.djfroh.ca\/index.php\/wp-json\/wp\/v2\/pages\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.djfroh.ca\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.djfroh.ca\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.djfroh.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.djfroh.ca\/index.php\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":2,"href":"https:\/\/www.djfroh.ca\/index.php\/wp-json\/wp\/v2\/pages\/31\/revisions"}],"predecessor-version":[{"id":37,"href":"https:\/\/www.djfroh.ca\/index.php\/wp-json\/wp\/v2\/pages\/31\/revisions\/37"}],"wp:attachment":[{"href":"https:\/\/www.djfroh.ca\/index.php\/wp-json\/wp\/v2\/media?parent=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}