{"id":3616,"date":"2016-06-30T18:15:25","date_gmt":"2016-06-30T14:15:25","guid":{"rendered":"http:\/\/dhtmlx.com\/blog\/?p=3616"},"modified":"2026-04-03T15:33:05","modified_gmt":"2026-04-03T12:33:05","slug":"creating-registration-form-online-form-builder","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/creating-registration-form-online-form-builder\/","title":{"rendered":"Creating Registration Form with Online Form Builder"},"content":{"rendered":"<p>\n        <div class=\"info-block\">\n            <div class=\"info-icon\">\n                <svg viewBox=\"0 0 14 16\">\n                    <path fill-rule=\"evenodd\" d=\"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z\"><\/path>\n                <\/svg>\n\n                INFO\n            <\/div>\n\n            <div class=\"info-content\">\n                <p>\n                    If you are using an outdated version of DHTMLX Suite 5 and require the documentation for it, \n                    please <a href=\"https:\/\/dhtmlx.com\/docs\/contact.shtml\" title=\"\">contact us<\/a>, <br \/>and we will send it to you.\n                <\/p>\n            <\/div>\n        <\/div>\n    <br \/>\nLet&#8217;s face it &#8211; a very small number of web applications goes without forms. Just once in the life developers created a form for the app, whether a small one with 2 inputs for login or a large application form. To improve the form building process, we&#8217;d like to offer you our <a href=\"https:\/\/dhtmlx.com\/docs\/products\/formBuilder\/\">online form creator<\/a> that will help with form elements arrangement and get a ready code on return.<\/p>\n<p>A small tutorial already exists in our <a href=\"https:\/\/docs.dhtmlx.com\/formbuilder__index.html\">documentation<\/a> that shows how to create forms with our free form builder tool, but today we&#8217;ll make a little bit larger registration form. Let&#8217;s begin with designer&#8217;s scratch:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/ffb-2.png\" alt=\"form scratch\" width=\"480\" height=\"566\" class=\"aligncenter size-full wp-image-3617\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/ffb-2.png 480w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/ffb-2-254x300.png 254w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>That&#8217;s the form we need for our application. Follow the instructions below to create such kind of form with us.<\/p>\n<p><strong>Preparations.<\/strong> First of all, let&#8217;s configure the settings block: we put the general data for our form, in particular we need: <\/p>\n<p>labelAlign &#8211; <em>left<\/em>. Nevertheless, checkboxes and radio buttons require <em>right<\/em> (we&#8217;ll discuss it later)<br \/>\nlabelWidth &#8211; 130<br \/>\ninputWidth &#8211; 270 (for the custom inputs)<br \/>\noffsetLeft &#8211; 0 (for the custom inputs)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/01-configure-settings-1.png\" alt=\"configure settings\" width=\"900\" height=\"621\" class=\"aligncenter size-full wp-image-3622\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/01-configure-settings-1.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/01-configure-settings-1-300x207.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/01-configure-settings-1-768x530.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p><strong>Full name field.<\/strong> The <em>full name<\/em> field contains two inputs. The best way to create this field is to divide it into 2 columns and unite into one block. It gives us the ability to arrange the rest of the elements below this block.<\/p>\n<p>A new block requires the following settings:<\/p>\n<p>inputWidth &#8211; 130<br \/>\nblockOffset &#8211; 0<\/p>\n<p>Also we remove label of the second input and add offsetLeft:7<\/p>\n<p>At the form building process, you may switch between Mockup and Preview tabs, it&#8217;ll show you whether you are on the right track or not.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/preview-mode.gif\" alt=\"preview mode\" width=\"1462\" height=\"810\" class=\"aligncenter size-full wp-image-3624\" \/><\/p>\n<p><strong>Phone number field.<\/strong> The <em>phone number<\/em> field is the same as a <em>full name<\/em> (just a slight difference in sizes), so the fastest way to create it is by copying the previous block.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/copy-block.gif\" alt=\"copy block\" width=\"1462\" height=\"811\" class=\"aligncenter size-full wp-image-3626\" \/><\/p>\n<p>Besides, we need to remove inputWidth in settings, replace label from full name to phone number, and make the custom width for the inputs: the first input gets 60, the second one &#8211; 200.<\/p>\n<p><strong>Company field.<\/strong> Now let&#8217;s deal with the <em>company<\/em> field. It&#8217;ll be quite simple: add an input, give it a name, using drag-n-drop move it after the <em>full name<\/em> block. As you may notice, each block has its own built-in offsets in the skin, that&#8217;s why we need to level the phone number field (move up and down). For this, the phone number block gets offsetTop &#8211; 5. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/company-field.gif\" alt=\"company field\" width=\"1458\" height=\"812\" class=\"aligncenter size-full wp-image-3628\" \/><\/p>\n<p><strong>Email field.<\/strong> It&#8217;s super easy to create an <em>email <\/em>field: copy the <em>company <\/em>block, drag and drop it to the right place and change the label to &#8220;email&#8221;.<br \/>\n<strong><br \/>\nCountry field.<\/strong> A <em>country <\/em>field is created by copying the <em>email <\/em>field, changing the type to select, and changing the label.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/country-field.png\" alt=\"country field\" width=\"900\" height=\"621\" class=\"aligncenter size-full wp-image-3630\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/country-field.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/country-field-300x207.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/country-field-768x530.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>Remember that you can check the interim result by switching the view from Mockup to Preview. Looks nice, isn&#8217;t it? ;)<\/p>\n<p><strong>Radio buttons.<\/strong> As you may remember from our scratch, there are two fields with checkboxes and radio buttons follow. Well, it&#8217;s not just copying and changing the name like we did in the previous steps, but more complicated work. But don&#8217;t worry &#8211; you just need a little more practice, and you\u2019ll create such kind of forms as easy as ABC.<\/p>\n<p>How to start: <\/p>\n<ol>\n<li>Create a block. Add blockOffset:0 and offsetTop:5 to this block (the same as for the phone number block). This block will contain a template with a sex label. <\/li>\n<li>inputWidth = 0.<\/li>\n<li>Add 2 radio buttons to the next 2 columns<\/li>\n<li>Set a little offset for the right radio button<\/li>\n<li>Make position:label-right for both radio buttons<\/li>\n<li>Change labelWidth:auto and type to radio (press ctrl to choose two items from the tree at once).<\/li>\n<\/ol>\n<p>To add radio functionality to the buttons, give them the similar name. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/10-radio-settings.png\" alt=\" radio settings\" width=\"900\" height=\"621\" class=\"aligncenter size-full wp-image-3632\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/10-radio-settings.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/10-radio-settings-300x207.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/10-radio-settings-768x530.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p><strong>Language field.<\/strong> Copy the previous block (the one with the radio buttons). Change the type from radio to checkbox, remove name, add the 3rd checkbox by copying the <em>female <\/em>column.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/checkboxes-ready.png\" alt=\"checkboxes ready\" width=\"900\" height=\"621\" class=\"aligncenter size-full wp-image-3633\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/checkboxes-ready.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/checkboxes-ready-300x207.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/checkboxes-ready-768x530.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>Almost ready! 3 more elements left.<\/p>\n<p><strong>Comments field.<\/strong> The familiar actions &#8211; copy the <em>company <\/em>block and rename the label.<\/p>\n<p><strong>One more checkbox.<\/strong> Copypaste the <em>language <\/em>block. Make a text of the template item equal to one space (we need it to take some space) and remove the next 2 columns.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/remove-columns.png\" alt=\"remove columns\" width=\"900\" height=\"621\" class=\"aligncenter size-full wp-image-3635\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/remove-columns.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/remove-columns-300x207.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/remove-columns-768x530.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>We are so close to finish.<\/p>\n<p><strong>Register button.<\/strong> Now we just add the button. In order to place it in the center of the form, we add offsetLeft:130 and offsetTop:30.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/17-button.png\" alt=\" button\" width=\"900\" height=\"621\" class=\"aligncenter size-full wp-image-3637\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/17-button.png 900w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/17-button-300x207.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/17-button-768x530.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>Check Preview tab and enjoy the created form! To add it to your application, click &#8220;Export&#8221; button and copy a ready code of your form.<br \/>\n<a href=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2016\/06\/form_struct.js\">Download the json we&#8217;ve exported<\/a>. Now you can import it to the <a href=\"https:\/\/dhtmlx.com\/docs\/products\/formBuilder\/live\/\">form builder<\/a> and get the form from our picture.<\/p>\n<p>We hope you enjoy the result as we do! :) Share your thoughts in comments and feel free to send your feature requests.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s face it &#8211; a very small number of web applications goes without forms. Just once in the life developers created a form for the app, whether a small &#8230;<\/p>\n","protected":false},"author":2,"featured_media":3640,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,71,1,38],"tags":[33,31,52,10,32],"class_list":["post-3616","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-posts-for-codeproject-com","category-tutorials","category-uncategorized","category-visible","tag-all-posts","tag-form","tag-form-builder","tag-dhtmlxsuite","tag-ui-designer"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/3616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/comments?post=3616"}],"version-history":[{"count":2,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/3616\/revisions"}],"predecessor-version":[{"id":15354,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/3616\/revisions\/15354"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/3640"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=3616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=3616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=3616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}