{"id":35888,"date":"2022-07-25T16:53:58","date_gmt":"2019-11-11T19:34:59","guid":{"rendered":"https:\/\/www.123formbuilder.com\/docs\/?p=35888"},"modified":"2023-10-04T10:07:34","modified_gmt":"2023-10-04T10:07:34","slug":"how-to-connect-web-forms-with-a-csv-file","status":"publish","type":"post","link":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/","title":{"rendered":"How to connect 123FormBuilder web forms with a CSV database file"},"content":{"rendered":"<p>Connect <a href=\"\/web-forms\/\">web forms<\/a> with a database by using our <b>Virtual database and dynamic prefill<\/b> app integration. Starting with our <a href=\"https:\/\/www.123formbuilder.com\/enterprise\/\" target=\"_blank\" rel=\"noopener\">Enterprise<\/a> plans you can benefit from this feature to empower your business and productivity using our <a href=\"\/\">form builder<\/a>.<\/p>\n<p>Once the form(s) are linked with your CSV file, the information gathered will populate your database. Prefill forms fields from your\u00a0CSV table to save time and improve consistency.<\/p>\n<p>Let&#8217;s look at an example:<\/p>\n<div style=\"text-align: center\">\n<div style=\"width: 640px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-35888-1\" width=\"640\" height=\"360\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/prefill.mp4?_=1\" \/><a href=\"https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/prefill.mp4\">https:\/\/staticresources123.s3.us-west-2.amazonaws.com\/docs\/prefill.mp4<\/a><\/video><\/div>\n<\/div>\n<p>First, you will need your database in a CSV format.\u00a0Below are listed the CSV file&#8217;s requirements:<\/p>\n<ul>\n<li>Cells are formatted with <b>text<\/b><\/li>\n<li>Field delimiter is set\u00a0to <b>comma<\/b><\/li>\n<li>Text delimiter is set to<b> quotation marks<\/b><\/li>\n<li><b>UTF-8<\/b> characters supported<\/li>\n<\/ul>\n<p>Once you have the CSV file ready, go to your form&#8217;s <b>Integrations<\/b> section. Search for the <b>Database Manager<\/b> icon and click on <b>Add<\/b>.<\/p>\n<p>The tables can be uploaded as a CSV file, through the <b>Create table<\/b> button. Here you can name the table and the given name will be used in the SQL rules, to return values.<\/p>\n<p>Tables can be managed in the <b>Explore database<\/b> section.<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/database3.png\" alt=\"connect web forms with a database\" width=\"820\" height=\"250\" \/><\/p>\n<p>Tables will be displayed in the left-side panel. Clicking on a table will open its content in the main view.<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/exploredatabase.png\" alt=\"connect web forms with a database\" width=\"720\" height=\"250\" \/><\/p>\n<p><b>Create SQL rules <\/b>to specify the acceptable values that can be inserted into a column or to prefill form fields.\u00a0Create queries to search for certain customers that meet specific criteria.<\/p>\n<p style=\"text-align: center\"><a href=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2022\/07\/mC9RZfzzuH.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47033\" src=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2022\/07\/mC9RZfzzuH.png\" alt=\"\" width=\"767\" height=\"321\" srcset=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2022\/07\/mC9RZfzzuH.png 767w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2022\/07\/mC9RZfzzuH-300x126.png 300w\" sizes=\"auto, (max-width: 767px) 100vw, 767px\" \/><\/a><\/p>\n<p>By prefiling your form fields based on a keyword you can avoid mistypes. The information is automatically pulled from your database and form users don&#8217;t need to re-enter their details over and over again.<\/p>\n<p>That&#8217;s it! Now your form can read from your database and populate the data on the form.<\/p>\n<p>Here are two syntaxes examples that you may want to use:<\/p>\n<p><b>Inserting into the table<\/b>:<br \/>\nINSERT (IGNORE) INTO table_name SET column_name=:field_control (SET second_column_name=:other_field_control, etc.)<\/p>\n<p><b>Update the table info<\/b>:<br \/>\ntable_name SET column_name=:field_control WHERE other_column_name=:other_field_control (AND second_column_name=:second_field_control, etc.)<br \/>\n*Include REMOTE at the beginning of the above syntaxes if the table is stored on a remote server.<\/p>\n<p>Here is an example:<br \/>\nWhen the form is submitted, the action should store the data in the contacts table.<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" class=\"alignnone\" src=\"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/sql1.jpg\" alt=\"123Formbuilder web forms\" width=\"620\" \/><\/p>\n<p>Normally, if you fill the form twice, using the same code, you will have 2 rows inserted, with the same code, and the corresponding data.<\/p>\n<p>If you wish to only keep the latest data, you have to set the code column as unique. This is done from the <b>Explore database<\/b> panel. After selecting a table from the list also click on the key symbol at the bottom of the list. This will open up a separate view of the table columns and their type, from which you can enable\/disable the primary key lock.<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" class=\"alignnone\" src=\"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/sql2.jpg\" alt=\"123Formbuilder web forms\" width=\"620\" \/><\/p>\n<p>You will be able to use INSERT INTO IGNORE as a function so that you do not get entry rows with the same primary key.<\/p>\n<p>Even if you are not familiar with SQL queries, our Corporate plans have an advantage. Once you sign up, a dedicated Account Manager will help you develop your forms based on your needs.<\/p>\n<p><b>Related articles<\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-forms-with-your-own-database\/\">How to connect forms with your own database<\/a><\/li>\n<li><a href=\"https:\/\/www.123formbuilder.com\/docs\/how-to-integrate-forms-with-wix-code\/\">How to integrate forms with Wix Code<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Connect web forms with a database by using our Virtual database and dynamic prefill app integration. Starting with our Enterprise plans you can benefit from this feature to empower your business and productivity using our form builder. Once the form(s) are linked with your CSV file, the information gathered will populate your database. Prefill forms [&hellip;]<\/p>\n","protected":false},"author":49,"featured_media":-1,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[83],"tags":[1202,1200],"class_list":["post-35888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-applications","tag-connect-form-with-csv-database-file","tag-database-manager"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Help: Connect Forms with Local Database | 123FormBuilder<\/title>\n<meta name=\"description\" content=\"In this article, you will learn how to connect a CSV database with your 123FormBuilder form, quick and easy. Just follow these instructions to get started.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to connect 123FormBuilder web forms with a CSV database file\" \/>\n<meta property=\"og:description\" content=\"In this article, you will learn how to connect a CSV database with your 123FormBuilder form, quick and easy. Just follow these instructions to get started.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/\" \/>\n<meta property=\"og:site_name\" content=\"123FormBuilder Knowledge Base\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-11T19:34:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-04T10:07:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/database3.png\" \/>\n<meta name=\"author\" content=\"Julia\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Julia\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Help: Connect Forms with Local Database | 123FormBuilder","description":"In this article, you will learn how to connect a CSV database with your 123FormBuilder form, quick and easy. Just follow these instructions to get started.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/","og_locale":"en_US","og_type":"article","og_title":"How to connect 123FormBuilder web forms with a CSV database file","og_description":"In this article, you will learn how to connect a CSV database with your 123FormBuilder form, quick and easy. Just follow these instructions to get started.","og_url":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/","og_site_name":"123FormBuilder Knowledge Base","article_published_time":"2019-11-11T19:34:59+00:00","article_modified_time":"2023-10-04T10:07:34+00:00","og_image":[{"url":"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/database3.png","type":"","width":"","height":""}],"author":"Julia","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Julia","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/#article","isPartOf":{"@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/"},"author":{"name":"Julia","@id":"https:\/\/www.123formbuilder.com\/docs\/#\/schema\/person\/cc469207f9fad9e280a743a5dc96a843"},"headline":"How to connect 123FormBuilder web forms with a CSV database file","datePublished":"2019-11-11T19:34:59+00:00","dateModified":"2023-10-04T10:07:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/"},"wordCount":569,"commentCount":2,"image":{"@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/#primaryimage"},"thumbnailUrl":"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/database3.png","keywords":["connect form with CSV database file","database manager"],"articleSection":["Third Party Apps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/","url":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/","name":"Help: Connect Forms with Local Database | 123FormBuilder","isPartOf":{"@id":"https:\/\/www.123formbuilder.com\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/#primaryimage"},"image":{"@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/#primaryimage"},"thumbnailUrl":"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/database3.png","datePublished":"2019-11-11T19:34:59+00:00","dateModified":"2023-10-04T10:07:34+00:00","author":{"@id":"https:\/\/www.123formbuilder.com\/docs\/#\/schema\/person\/cc469207f9fad9e280a743a5dc96a843"},"description":"In this article, you will learn how to connect a CSV database with your 123FormBuilder form, quick and easy. Just follow these instructions to get started.","breadcrumb":{"@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/#primaryimage","url":"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/database3.png","contentUrl":"https:\/\/staticresources123.s3-us-west-2.amazonaws.com\/docs\/database3.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.123formbuilder.com\/docs\/how-to-connect-web-forms-with-a-csv-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.123formbuilder.com\/docs\/"},{"@type":"ListItem","position":2,"name":"How to connect 123FormBuilder web forms with a CSV database file"}]},{"@type":"WebSite","@id":"https:\/\/www.123formbuilder.com\/docs\/#website","url":"https:\/\/www.123formbuilder.com\/docs\/","name":"123FormBuilder Knowledge Base","description":"Search our documentation platform for answers, service specifications and 3rd-party integrations.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.123formbuilder.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.123formbuilder.com\/docs\/#\/schema\/person\/cc469207f9fad9e280a743a5dc96a843","name":"Julia","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1b07bbd30c86170f8eb191468f69aaeab7b6cfddcd35ceaf4099ab76a5dccb06?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2FJulia%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1b07bbd30c86170f8eb191468f69aaeab7b6cfddcd35ceaf4099ab76a5dccb06?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2FJulia%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b07bbd30c86170f8eb191468f69aaeab7b6cfddcd35ceaf4099ab76a5dccb06?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2FJulia%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","caption":"Julia"},"url":"https:\/\/www.123formbuilder.com\/docs\/author\/julia-unguras123formbuilder-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/posts\/35888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/comments?post=35888"}],"version-history":[{"count":31,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/posts\/35888\/revisions"}],"predecessor-version":[{"id":47035,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/posts\/35888\/revisions\/47035"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/media?parent=35888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/categories?post=35888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/tags?post=35888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}