{"id":171,"date":"2019-03-20T13:15:25","date_gmt":"2019-03-20T13:15:25","guid":{"rendered":"http:\/\/bossakov.eu\/wpdemo\/?page_id=171"},"modified":"2019-03-20T13:15:25","modified_gmt":"2019-03-20T13:15:25","slug":"simple-drop-down-menu-with-paypal-support","status":"publish","type":"page","link":"https:\/\/bossakov.eu\/wpdemo\/pvb-cf7-calculator-pro\/simple-drop-down-menu-with-paypal-support\/","title":{"rendered":"Simple drop-down menu with PayPal support"},"content":{"rendered":"<p>This calculator demonstrates how you can use the <em>[variable]<\/em> tag to match text selections to numbers, and create a PayPal button based on the calculated values.<\/p>\n\n<div class=\"wpcf7 no-js\" id=\"wpcf7-f170-o1\" lang=\"en-US\" dir=\"ltr\" data-wpcf7-id=\"170\">\n<div class=\"screen-reader-response\"><p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><\/p> <ul><\/ul><\/div>\n<form action=\"\/wpdemo\/wp-json\/wp\/v2\/pages\/171#wpcf7-f170-o1\" method=\"post\" class=\"wpcf7-form init\" aria-label=\"Contact form\" novalidate=\"novalidate\" data-status=\"init\">\n<fieldset class=\"hidden-fields-container\"><input type=\"hidden\" name=\"_wpcf7\" value=\"170\" \/><input type=\"hidden\" name=\"_wpcf7_version\" value=\"6.1.7\" \/><input type=\"hidden\" name=\"_wpcf7_locale\" value=\"en_US\" \/><input type=\"hidden\" name=\"_wpcf7_unit_tag\" value=\"wpcf7-f170-o1\" \/><input type=\"hidden\" name=\"_wpcf7_container_post\" value=\"0\" \/><input type=\"hidden\" name=\"_wpcf7_posted_data_hash\" value=\"\" \/><input type=\"hidden\" name=\"_wpcf7cf_hidden_group_fields\" value=\"[]\" \/><input type=\"hidden\" name=\"_wpcf7cf_hidden_groups\" value=\"[]\" \/><input type=\"hidden\" name=\"_wpcf7cf_visible_groups\" value=\"[]\" \/><input type=\"hidden\" name=\"_wpcf7cf_repeaters\" value=\"[]\" \/><input type=\"hidden\" name=\"_wpcf7cf_steps\" value=\"{}\" \/><input type=\"hidden\" name=\"_wpcf7cf_options\" value=\"{&quot;form_id&quot;:170,&quot;conditions&quot;:[],&quot;settings&quot;:{&quot;animation&quot;:&quot;yes&quot;,&quot;animation_intime&quot;:200,&quot;animation_outtime&quot;:200,&quot;conditions_ui&quot;:&quot;normal&quot;,&quot;notice_dismissed&quot;:true,&quot;repeater_remove_button&quot;:&quot;bottom&quot;,&quot;wpcf7cf_settings_saved&quot;:1}}\" \/>\n<\/fieldset>\n<p><label>Product<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"product\"><select class=\"wpcf7-form-control wpcf7-select\" aria-invalid=\"false\" name=\"product\"><option value=\"Caffe Latte\">Caffe Latte<\/option><option value=\"Caffe Mocha\">Caffe Mocha<\/option><option value=\"White Chocolate Mocha\">White Chocolate Mocha<\/option><option value=\"Freshly Brewed Coffee\">Freshly Brewed Coffee<\/option><option value=\"Cinnamon Dolce Latte\">Cinnamon Dolce Latte<\/option><option value=\"Skinny Vanilla Latte\">Skinny Vanilla Latte<\/option><option value=\"Caramel Macchiato\">Caramel Macchiato<\/option><option value=\"Caramel Flan Latte\">Caramel Flan Latte<\/option><option value=\"Flat White\">Flat White<\/option><option value=\"Skinny Peppermint Mocha\">Skinny Peppermint Mocha<\/option><option value=\"Pumpkin Spice Latte\">Pumpkin Spice Latte<\/option><option value=\"Salted Caramel Mocha\">Salted Caramel Mocha<\/option><option value=\"Toasted Graham Latte\">Toasted Graham Latte<\/option><option value=\"Toasted Graham Latte\">Toasted Graham Latte<\/option><option value=\"Iced Coffee (with or without Milk)\">Iced Coffee (with or without Milk)<\/option><option value=\"Caramel Frappuccino\">Caramel Frappuccino<\/option><option value=\"Mocha Frappuccino\">Mocha Frappuccino<\/option><option value=\"Strawberries &amp; Creme Frappuccino\">Strawberries &amp; Creme Frappuccino<\/option><option value=\"Coffee Frappuccino\">Coffee Frappuccino<\/option><option value=\"Vanilla Bean Cr\u00e8me Frappuccino\">Vanilla Bean Cr\u00e8me Frappuccino<\/option><option value=\"Iced Caramel Macchiato\">Iced Caramel Macchiato<\/option><option value=\"Salted Caramel Mocha Frappuccino\">Salted Caramel Mocha Frappuccino<\/option><\/select><\/span><\/label>\n<\/p>\n<p><label>Quantity<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"qty\"><input class=\"wpcf7-form-control wpcf7-number wpcf7-validates-as-required wpcf7-validates-as-number\" aria-required=\"true\" aria-invalid=\"false\" value=\"1\" type=\"number\" name=\"qty\" \/><\/span><\/label>\n<\/p>\n\n<!-- Hidden field that matches product to price -->\n<p>[variable price cf7-hide \"product:\" \"Caffe Latte 2.95\" \"Caffe Mocha 3.45\" \"White Chocolate Mocha 3.75\" \"Freshly Brewed Coffee 1.85\" \"Cinnamon Dolce Latte 3.65\" \"Skinny Vanilla Latte 3.45\" \"Caramel Macchiato 3.75\" \"Caramel Flan Latte 3.75\" \"Flat White 3.75\" \"Skinny Peppermint Mocha 3.95\" \"Pumpkin Spice Latte 4.25\" \"Salted Caramel Mocha 4.25\" \"Toasted Graham Latte 4.25\" \"Toasted Graham Latte 4.95\" \"Iced Coffee (with or without Milk) 2.25\" \"Caramel Frappuccino 3.95\" \"Mocha Frappuccino 3.95\" \"Strawberries & Creme Frappuccino 3.95\" \"Coffee Frappuccino 3.25\" \"Vanilla Bean Cr\u00e8me Frappuccino 3.25\" \"Iced Caramel Macchiato 3.75\" \"Salted Caramel Mocha Frappuccino 4.25\"]\n<\/p>\n<p><input class=\"wpcf7-form-control wpcf7-calculate_button cf7-calculate_button\" type=\"button\" value=\"Calculate\" \/>\n<\/p>\n<p><label>Price:<br \/>\n<span class=\"wpcf7-form-control-wrap result\"><input size=\"40\" class=\"wpcf7-form-control wpcf7-calculation cf7-calculation\" readonly=\"readonly\" aria-invalid=\"false\" value=\"0\" type=\"text\" name=\"result\" \/><\/span><\/label><br \/>\n[paypal paypal_button email:petko@bossakov.eu field:result currency:USD]\n<\/p><input type=\"hidden\" name=\"_pvb_ajax_calc_nonce\" value=\"5a80c6b9a0\"><div class=\"wpcf7-response-output\" aria-hidden=\"true\"><\/div>\n<\/form>\n<\/div>\n\n<h2>Source code for this form:<\/h2>\n<pre>\r\n&lt;label&gt;Product\r\n[select product \"Caffe Latte\" \"Caffe Mocha\" \"White Chocolate Mocha\" \"Freshly Brewed Coffee\" \"Cinnamon Dolce Latte\" \"Skinny Vanilla Latte\" \"Caramel Macchiato\" \"Caramel Flan Latte\" \"Flat White\" \"Skinny Peppermint Mocha\" \"Pumpkin Spice Latte\" \"Salted Caramel Mocha\" \"Toasted Graham Latte\" \"Toasted Graham Latte\" \"Iced Coffee (with or without Milk)\" \"Caramel Frappuccino\" \"Mocha Frappuccino\" \"Strawberries & Creme Frappuccino\" \"Coffee Frappuccino\" \"Vanilla Bean Cr\u00e8me Frappuccino\" \"Iced Caramel Macchiato\" \"Salted Caramel Mocha Frappuccino\"]&lt;\/label&gt;\r\n\r\n&lt;label&gt;Quantity\r\n[number* qty \"1\"]&lt;\/label&gt;\r\n\r\n&lt;!-- Hidden field that matches product to price --&gt;\r\n[variable price cf7-hide \"product:\" \"Caffe Latte 2.95\" \"Caffe Mocha 3.45\" \"White Chocolate Mocha 3.75\" \"Freshly Brewed Coffee 1.85\" \"Cinnamon Dolce Latte 3.65\" \"Skinny Vanilla Latte 3.45\" \"Caramel Macchiato 3.75\" \"Caramel Flan Latte 3.75\" \"Flat White 3.75\" \"Skinny Peppermint Mocha 3.95\" \"Pumpkin Spice Latte 4.25\" \"Salted Caramel Mocha 4.25\" \"Toasted Graham Latte 4.25\" \"Toasted Graham Latte 4.95\" \"Iced Coffee (with or without Milk) 2.25\" \"Caramel Frappuccino 3.95\" \"Mocha Frappuccino 3.95\" \"Strawberries & Creme Frappuccino 3.95\" \"Coffee Frappuccino 3.25\" \"Vanilla Bean Cr\u00e8me Frappuccino 3.25\" \"Iced Caramel Macchiato 3.75\" \"Salted Caramel Mocha Frappuccino 4.25\"]\r\n\r\n[calculate_button \"Calculate\"]\r\n\r\n&lt;label&gt;Price:\r\n[calculation result precision:2 \"price * qty\"]&lt;\/label&gt;\r\n[paypal paypal_button email:my_paypal_email@example.com field:result currency:USD]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This calculator demonstrates how you can use the [variable] tag to match text selections to numbers, and create a PayPal button based on the calculated values. Source code for this form: &lt;label&gt;Product [select product &#8220;Caffe Latte&#8221; &#8220;Caffe Mocha&#8221; &#8220;White Chocolate Mocha&#8221; &#8220;Freshly Brewed Coffee&#8221; &#8220;Cinnamon Dolce Latte&#8221; &#8220;Skinny Vanilla Latte&#8221; &#8220;Caramel Macchiato&#8221; &#8220;Caramel Flan Latte&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-171","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/pages\/171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/comments?post=171"}],"version-history":[{"count":6,"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/pages\/171\/revisions"}],"predecessor-version":[{"id":177,"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/pages\/171\/revisions\/177"}],"up":[{"embeddable":true,"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/pages\/2"}],"wp:attachment":[{"href":"https:\/\/bossakov.eu\/wpdemo\/wp-json\/wp\/v2\/media?parent=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}