{"id":2185,"date":"2021-08-25T15:59:02","date_gmt":"2021-08-25T14:59:02","guid":{"rendered":"https:\/\/digi-ed.uk\/support\/?post_type=ht_kb&#038;p=2185"},"modified":"2024-09-06T14:21:47","modified_gmt":"2024-09-06T13:21:47","slug":"how-to-add-pre-population-in-form2","status":"publish","type":"ht_kb","link":"https:\/\/digi-ed.uk\/support\/article\/how-to-add-pre-population-in-form2\/","title":{"rendered":"How to Add Pre-population in SparkForms"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Form2 - Pre population\" width=\"1200\" height=\"900\" src=\"https:\/\/www.youtube.com\/embed\/x25ShMaopjw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption class=\"wp-element-caption\">Since recording this video, we have transitioned from Form2 to SparkForms as our provider. The software interface and processes remain the same despite this change.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">What is Pre-Population?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Pre-Population allows us to pre-populate fields with predefined data from a CSV document. For example, we can pre-populate a drop-down box with a list of assessor names, which when selected can then populate one or more other fields such as an email address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When setting up pre-population we must ensure each column is named after the System Name of the field, this will ensure when the data is imported it is mapped to the correct field.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you input an incorrect email address, assessment code the within the CSV the Buffer and ADB will reject the assessment.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">The System name &#8216;Hashcode&#8217; and &#8216;Assessmentcode&#8217; have both been used, in different forms. Check the form.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Adding pre-population<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select the form pre-population is to be added.<\/li>\n\n\n\n<li>Select the \u2018Pre-population\u2019 tab.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Setting<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select the blue \u2018Configure\u2019 button under the \u2018Settings\u2019 heading.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">In the majority of cases, we use a \u2018Compulsory\u2019 configuration to ensure only pre-defined options are available for selection. If we allowed users to enter their own options, the form would not correctly map the options to the ADB and this would result in errors.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Select \u2018Compulsory\u2019<\/li>\n\n\n\n<li>Click Save.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Upload the CSV file<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">With \u2018Compulsory\u2019 set, we can continue to upload the CSV file containing the data we want to pre-populate. Select the green \u2018Upload data&#8217; button in the \u2018Data\u2019 section.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Browse to your CSV file containing the pre-population data, then select \u201cOpen\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the CSV has been uploaded, you will need to publish it, before it can be used within the form. Select the green arrow on the right to publish the pre-population data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To identify if the pre-population file has been published, look for a green tick or a red cross in the \u2018Published\u2019 column next to the CSV file name. Please note: It is possible to add multiple CSV pre-population files to the same form.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pre-Population allows us to pre-populate fields with predefined data from a CSV document. For example, we can pre-populate a drop-down box with a list of assessor names, which when selected can then populate one or more other fields such as an email address.<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[66],"ht-kb-tag":[175],"class_list":["post-2185","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-sparkforms","ht_kb_tag-pre-population"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/ht-kb\/2185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/comments?post=2185"}],"version-history":[{"count":3,"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/ht-kb\/2185\/revisions"}],"predecessor-version":[{"id":6918,"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/ht-kb\/2185\/revisions\/6918"}],"wp:attachment":[{"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/media?parent=2185"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/ht-kb-category?post=2185"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/digi-ed.uk\/support\/wp-json\/wp\/v2\/ht-kb-tag?post=2185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}