{"id":108,"date":"2018-06-20T14:31:52","date_gmt":"2018-06-20T14:31:52","guid":{"rendered":"https:\/\/www.process.st\/help\/variable-feature-update\/"},"modified":"2024-03-07T11:38:35","modified_gmt":"2024-03-07T11:38:35","slug":"variable-feature-update","status":"publish","type":"post","link":"https:\/\/www.process.st\/help\/variable-feature-update\/","title":{"rendered":"Update to Template Variables"},"content":{"rendered":"<p>We have recently made some updates to our <a href=\"https:\/\/www.process.st\/help\/docs\/variables\/\">variables<\/a> feature.<\/p>\n<p><strong>Default values<\/strong><\/p>\n<p>You can now make a variable have a default value.<\/p>\n<p>So instead of &#8220;Hey {{form.First_Name}},&#8221;<br \/>\nYou could use &#8220;Hey {{form.First_Name|default:&#8217;there&#8217;}},&#8221;<\/p>\n<p>This would insert &#8220;there&#8221; as a default value if there is nothing typed into the &#8220;First_Name&#8221; <a href=\"https:\/\/www.process.st\/help\/docs\/form-fields\/\">form field<\/a>.<\/p>\n<p>Note that when using inverted commas, you&#8217;ll need to use two separate &#8216; &#8216; instead of &#8220;.<\/p>\n<p><strong>URL encode<\/strong><\/p>\n<p>Sometimes, URL&#8217;s break if used as part of a variable.<\/p>\n<p>For example, if you had a job title form field and the value was &#8220;Chief Executive Officer&#8221; that would cause the URL to stop functioning.<\/p>\n<p>To fix this, use the URL encode variable option to make sure your link keeps working.<br \/>\n<a href=\"http:\/\/google.com\/?q={{form.Query\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">http:\/\/google.com?q={{form.Query<\/a>|url_encode}}<\/p>\n<p><strong>Spaces in variables<\/strong><\/p>\n<p>One final thing to note is &#8216;spaces&#8217; have no effect on variables.<br \/>\nExample &#8211; {{Hey}} is the same as {{ Hey }} and also {{Hey }}<\/p>\n<p>You can find more information in our variables help article <a href=\"https:\/\/www.process.st\/help\/docs\/variables\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have recently made some updates to our variables feature. Default values You can now make a variable have a default value. So instead of &#8220;Hey {{form.First_Name}},&#8221; You could use &#8220;Hey {{form.First_Name|default:&#8217;there&#8217;}},&#8221; This would insert &#8220;there&#8221; as a default value if there is nothing typed into the &#8220;First_Name&#8221; form field. Note that when using inverted [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"available_plan":"All plans","available_product":"Workflows","footnotes":""},"categories":[4],"tags":[29],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-updates","tag-variables"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":1,"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":7632,"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/posts\/108\/revisions\/7632"}],"wp:attachment":[{"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.process.st\/help\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}