{"id":7096,"date":"2021-04-15T07:17:50","date_gmt":"2021-04-15T07:17:50","guid":{"rendered":"https:\/\/docs.campaignsuite.nl\/docs\/gravity-forms\/edit-a-form\/prefill-html-and-textarea\/"},"modified":"2021-05-11T19:58:41","modified_gmt":"2021-05-11T19:58:41","slug":"prefill-html-and-textarea","status":"publish","type":"docs","link":"https:\/\/docs.campaignsuite.nl\/en\/docs\/gravity-forms\/edit-a-form\/prefill-html-and-textarea\/","title":{"rendered":"Prefill HTML and textarea"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"7096\" class=\"elementor elementor-7096\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-15c139a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"15c139a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e591df0\" data-id=\"e591df0\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bb565e2 elementor-widget elementor-widget-text-editor\" data-id=\"bb565e2\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tCampaignSuite makes it possible to have a text box or HTML field in your form automatically filled with values from other fields in the form. This can be especially useful for showing a detailed summary of the information entered on the form on your last page of the form.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-57966ee elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"57966ee\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-861d7f8\" data-id=\"861d7f8\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a8aefcc elementor-widget elementor-widget-docly_alerts_box\" data-id=\"a8aefcc\" data-element_type=\"widget\" data-widget_type=\"docly_alerts_box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t        \r\n                    <blockquote class=\"media notice notice-message\">\r\n                <i ><\/i>\r\n                <div class=\"media-body\">\r\n                                            <h5 class=\"title\"> Note<\/h5>\r\n                                        <p>This functionality only works if your form consists of more than 1 page. The fields are filled when the visitor switches pages in the form.<\/p>\n                <\/div>\r\n            <\/blockquote>\r\n        \r\n        \r\n        \t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-d7fb2dc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d7fb2dc\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1d70f33\" data-id=\"1d70f33\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1b380e4 elementor-widget elementor-widget-text-editor\" data-id=\"1b380e4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The images below show two examples of how you can fill a text box and HTML field.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a071977 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a071977\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-9c63f13\" data-id=\"9c63f13\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7efb31a elementor-widget elementor-widget-image\" data-id=\"7efb31a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-11-at-21.56.27.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"Screenshot 2021-05-11 at 21.56.27\" e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NzI3NiwidXJsIjoiaHR0cHM6XC9cL2RvY3MuY2FtcGFpZ25zdWl0ZS5ubFwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyMVwvMDNcL1NjcmVlbnNob3QtMjAyMS0wNS0xMS1hdC0yMS41Ni4yNy5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"564\" src=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-11-at-21.56.27.png\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-11-at-21.56.27.png 730w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-11-at-21.56.27-300x232.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-b95b768\" data-id=\"b95b768\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-44d4f10 elementor-widget elementor-widget-image\" data-id=\"44d4f10\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-11-at-21.57.59.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"Screenshot 2021-05-11 at 21.57.59\" e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NzI3OCwidXJsIjoiaHR0cHM6XC9cL2RvY3MuY2FtcGFpZ25zdWl0ZS5ubFwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyMVwvMDNcL1NjcmVlbnNob3QtMjAyMS0wNS0xMS1hdC0yMS41Ny41OS5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"630\" src=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-11-at-21.57.59.png\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-11-at-21.57.59.png 740w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-11-at-21.57.59-300x255.png 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-93be1e8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"93be1e8\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5c6a798\" data-id=\"5c6a798\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0ac3320 elementor-widget elementor-widget-text-editor\" data-id=\"0ac3320\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tThe values of the fields can be entered by the syntax:\n<strong> {input_<em>field_id<\/em>}\n<\/strong> Where <strong> field_id <\/strong> is the ID of the field in your form.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f0e32bf elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f0e32bf\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e91eea2\" data-id=\"e91eea2\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f7247d5 elementor-widget elementor-widget-docly_alerts_box\" data-id=\"f7247d5\" data-element_type=\"widget\" data-widget_type=\"docly_alerts_box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t        \r\n                    <blockquote class=\"media notice notice-message\">\r\n                <i ><\/i>\r\n                <div class=\"media-body\">\r\n                                            <h5 class=\"title\"> Did you know<\/h5>\r\n                                        <p>If you add the parameter ?<strong>cs_post=true <\/strong> to the URL of the page where your form is located, you will see (when you click the button at the bottom of the form) exactly which field IDs and values you can use when prefilling text boxes and HTML fields.<br \/><a href=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-03-09-at-21.27.29.png\"> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp- image-6235 size-medium \" src=\" https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-03-09-at-21.27.29-300x158.png \" alt=\"\" width=\"300\" height=\"158\" \/> <\/a><\/p>\n                <\/div>\r\n            <\/blockquote>\r\n        \r\n        \r\n        \t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-9830ae7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9830ae7\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9f8f5b2\" data-id=\"9f8f5b2\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c0cf0e5 elementor-widget elementor-widget-text-editor\" data-id=\"c0cf0e5\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>Timber plugin<\/h4><p>It is also possible to apply some logic to the code in the fields. If you have installed the plugin <a href=\"https:\/\/upstatement.com\/timber\/\" target=\"_blank\" rel=\"noopener\"> Timber <\/a> it is also possible to use .twig logic. See <a href=\"https:\/\/notlaura.com\/the-twig-for-timber-cheatsheet\/\" target=\"_blank\" rel=\"noopener\"> this website <\/a> for an explanation of the possibilities.<\/p><p>Some examples of .twig logic are:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-112ecb1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"112ecb1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-fe97d57\" data-id=\"fe97d57\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-60de927 elementor-widget elementor-widget-docly_code_syntax_highlighter\" data-id=\"60de927\" data-element_type=\"widget\" data-widget_type=\"docly_code_syntax_highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t                    <div class=\"docly-source-code prism\" data-lng-type=\"twig\">\r\n\t\t\t<pre>\r\n\t\t\t\t<code class=\"language-twig\">\r\n\t\t\t\t\t{% if &quot;{input_1}&quot; == &quot;Ideal&quot; %}\n    This is an Ideal payment\n{% else %}\n    This is not an Ideal payment\n{% endif %}\t\t\t\t<\/code>\r\n\t\t\t<\/pre>\r\n            <\/div>\r\n                \t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a0bd92b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a0bd92b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2c2b3b3\" data-id=\"2c2b3b3\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-aa47d7a elementor-widget elementor-widget-docly_code_syntax_highlighter\" data-id=\"aa47d7a\" data-element_type=\"widget\" data-widget_type=\"docly_code_syntax_highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t                    <div class=\"docly-source-code prism\" data-lng-type=\"twig\">\r\n\t\t\t<pre>\r\n\t\t\t\t<code class=\"language-twig\">\r\n\t\t\t\t\t{% switch &quot;{input_3}&quot; %}\n    {% case &#039;Ideal&#039; %}\n        &lt;p&gt;Ideal payment&lt;\/p&gt;\n    {% case &#039;Direct debit&#039; %}\n        &lt;p&gt;Debit&lt;\/p&gt;\n    {% case &#039;Creditcard&#039; %}\n    {% case &#039;Sofort&#039; %}\n        &lt;p&gt;Other payment method&lt;\/p&gt;\n    {% default %}\n        &lt;p&gt;Unknown payment method&lt;\/p&gt;\n{% endswitch %}\t\t\t\t<\/code>\r\n\t\t\t<\/pre>\r\n            <\/div>\r\n                \t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>CampaignSuite makes it possible to have a text box or HTML field in your form automatically filled with values from other fields in the form. This can be especially useful for showing a detailed summary of the information entered on the form on your last page of the form. Note This functionality only works if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":7076,"menu_order":4,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-7096","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7096","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/comments?post=7096"}],"version-history":[{"count":6,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7096\/revisions"}],"predecessor-version":[{"id":7284,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7096\/revisions\/7284"}],"up":[{"embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7076"}],"wp:attachment":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/media?parent=7096"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/doc_tag?post=7096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}