{"id":2647,"date":"2020-03-13T12:52:20","date_gmt":"2020-03-13T11:52:20","guid":{"rendered":"https:\/\/da-software.de\/?p=2647"},"modified":"2021-06-25T18:12:16","modified_gmt":"2021-06-25T16:12:16","slug":"form-field-with-rounded-corners","status":"publish","type":"post","link":"https:\/\/da-software.net\/en\/2020\/03\/form-field-with-rounded-corners\/","title":{"rendered":"Form field with rounded corners"},"content":{"rendered":"<p>By default, form fields such as <em>input<\/em>, <em>textarea<\/em> or <em>checkboxes<\/em> of an online form are displayed with rectangular edges and a <a title=\"Change frame width of a form field\" href=\"https:\/\/da-software.de\/2018\/03\/formularfelder-rand-bzw-rahmen-mit-css-anpassen\/\">narrow frame width<\/a>. Such a standard form can be seen below as an example.<\/p>\n<figure id=\"attachment_2634\" aria-describedby=\"caption-attachment-2634\" style=\"width: 349px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2634\" title=\"Example rectangular corners\" src=\"\/wp-content\/uploads\/2020\/03\/online-form-field-with-angular-corners.png\" alt=\"Screenshot of a contact form with rectangular frames of the form fields\" width=\"349\" height=\"335\" srcset=\"\/wp-content\/uploads\/2020\/03\/online-form-field-with-angular-corners.png 349w, \/wp-content\/uploads\/2020\/03\/online-form-field-with-angular-corners-300x288.png 300w\" sizes=\"auto, (max-width: 349px) 100vw, 349px\" \/><figcaption id=\"caption-attachment-2634\" class=\"wp-caption-text\">Example of a web form with rectangular edges<\/figcaption><\/figure>\n<p>Form fields with rounded corners appears somewhat more modern and interesting, especially when displayed on mobile devices. The fact that this design feature is used frequently can already be seen on many <a title=\"create online form with web form builder\" href=\"https:\/\/da-software.net\/en\/software\/da-formmaker\/\">Internet forms<\/a>.<\/p>\n<p><figure id=\"attachment_2630\" aria-describedby=\"caption-attachment-2630\" style=\"width: 350px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2630\" title=\"Example rounded corners with border-radius: 7px\" src=\"\/wp-content\/uploads\/2020\/03\/online-form-field-with-round-corners.png\" alt=\"Screenshot of an online form with rounded corners of the form fields\" width=\"350\" height=\"335\" srcset=\"\/wp-content\/uploads\/2020\/03\/online-form-field-with-round-corners.png 350w, \/wp-content\/uploads\/2020\/03\/online-form-field-with-round-corners-300x287.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><figcaption id=\"caption-attachment-2630\" class=\"wp-caption-text\">Example of an HTML form type with round corners for the form fields<\/figcaption><\/figure><br \/>\n<a title=\"create rounded corners with online form builder\" href=\"https:\/\/da-software.net\/en\/software\/da-formmaker\/\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/03\/create-rounded-corners-form-fields.jpg\" alt=\"software product to create rounded corner form fields\" width=\"269\" height=\"250\" class=\"aligncenter size-full wp-image-5757\" \/><\/a><\/p>\n<h3>Online form field adjust frame radius<\/h3>\n<p>You can easily configure the rounded corners with the <a title=\"How to learn CSS\" href=\"https:\/\/www.tutorialspoint.com\/css\/index.htm\" target=\"_blank\" rel=\"noopener noreferrer\">CSS<\/a> property <em><strong>border-radius<\/strong><\/em>. The following code examples show the direct application to a <em>input<\/em> field of type <em>text<\/em>.<\/p>\n<p>You can specify the setting for the frame radius directly for each form field individually, as in the code example below:<\/p>\n<pre><code>&lt;input type=\"text\" name=\"surname\" id=\"surname\" <span style=\"color: #ff0000;\">style=\"border-radius: 5px;\"<\/span>\/&gt;<\/code><\/pre>\n<p>But you can also include it as CSS style either in your own CSS file or in the header of the HTML file:<\/p>\n<pre><code>&lt;head&gt;\r\n&lt;style type=\"text\/css\"&gt;\r\ninput, textarea {\r\n    <span style=\"color: #ff0000;\">border-radius:5px;<\/span>\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;form action=\"send.html\" id=\"contact\"&gt;\r\n&lt;label for=\"firstname\"&gt;First Name&lt;\/label&gt;\r\n&lt;input type=\"text\" name=\"firstname\" id=\"firstname\"\/&gt;&lt;br&gt;\r\n&lt;label for=\"surname\"&gt;Last Name&lt;\/label&gt;\r\n&lt;input type=\"text\" name=\"surname\" id=\"surname\" \/&gt;&lt;br&gt;\r\n&lt;button type=\"reset\"&gt;Reset&lt;\/button&gt;\r\n&lt;button type=\"submit\"&gt;Send&lt;\/button&gt;\r\n&lt;\/form&gt;\r\n<\/code><\/pre>\n<p>Another way to include the CSS is to create a separate CSS class. So you can define different CSS classes and design properties for different form fields.<\/p>\n<pre><code>&lt;head&gt;\r\n&lt;style type=\"text\/css\"&gt;\r\n<span style=\"color: #ff0000;\">.myborders {<\/span>\r\n<span style=\"color: #ff0000;\">    border-radius:5px;<\/span>\r\n<span style=\"color: #ff0000;\">}<\/span>\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;form action=\"send.html\" id=\"contact\"&gt;\r\n&lt;label for=\"firstname\"&gt;First Name&lt;\/label&gt;\r\n&lt;input <span style=\"color: #ff0000;\">class=\"myborders\"<\/span> type=\"text\" name=\"firstname\" id=\"firstname\"\/&gt;&lt;br&gt;\r\n&lt;label for=\"surname\"&gt;Last Name&lt;\/label&gt;\r\n&lt;input type=\"text\" name=\"surname\" id=\"surname\" \/&gt;&lt;br&gt;\r\n&lt;button type=\"reset\"&gt;Reset&lt;\/button&gt;\r\n&lt;button type=\"submit\"&gt;Send&lt;\/button&gt;\r\n&lt;\/form&gt;<\/code><\/pre>\n<h3>HTML form field Remove frame radius<\/h3>\n<p>Well, actually, it&#8217;s trivial: If you want to have square edges again, just set the CSS property <em><u>border-radius:0px<\/u><\/em> or remove this property completely.<\/p>\n<h3>change radius of form fields in the form editor<\/h3>\n<p>This is of course one of many features that can be configured on such a web form. If you want to do it all by hand, you have all the freedom you need, but it can also take a lot of time. <a title=\"Create web form\" href=\"https:\/\/da-software.de\/en\/software\/da-formmaker\/\">If you create the online form<\/a> with a suitable editor, you can configure the radius of the frame with one click.<\/p>\n<figure id=\"attachment_2623\" aria-describedby=\"caption-attachment-2623\" style=\"width: 700px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2623 size-full\" title=\"Bootstrap design frame Radius Set form field\" src=\"\/wp-content\/uploads\/2020\/03\/form-field-border-radius-setting.png\" alt=\"Screenshot: Set radius for round corners in the form field\" width=\"700\" height=\"611\" srcset=\"\/wp-content\/uploads\/2020\/03\/form-field-border-radius-setting.png 700w, \/wp-content\/uploads\/2020\/03\/form-field-border-radius-setting-300x262.png 300w, \/wp-content\/uploads\/2020\/03\/form-field-border-radius-setting-600x524.png 600w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><figcaption id=\"caption-attachment-2623\" class=\"wp-caption-text\">DA-FormMaker setting for rounded corners in the online form<\/figcaption><\/figure>","protected":false},"excerpt":{"rendered":"<p>Give your online forms an interesting, modern look by using rounded corners for the frame of the form fields. This article describes how to achieve this in no time with the CSS property <em>&#8220;border-radius&#8221;<\/em>.<\/p>\n","protected":false},"author":2,"featured_media":667,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[20],"tags":[173,172,111,125,174,114,127],"class_list":["post-2647","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-and-tricks","tag-border-en","tag-css-en","tag-internet-form","tag-online-form","tag-radius-en","tag-tutorial-en","tag-website-form"],"_links":{"self":[{"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/posts\/2647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/comments?post=2647"}],"version-history":[{"count":0,"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/posts\/2647\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/media\/667"}],"wp:attachment":[{"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/media?parent=2647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/categories?post=2647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/da-software.net\/en\/wp-json\/wp\/v2\/tags?post=2647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}