{"id":18246,"date":"2020-05-14T13:19:58","date_gmt":"2020-05-14T17:19:58","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=18246"},"modified":"2021-06-25T11:04:52","modified_gmt":"2021-06-25T15:04:52","slug":"how-to-change-the-text-color-for-field-labels-in-wpforms","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/boldgrid-inspirations-plugin-product-guide\/how-to-change-the-text-color-for-field-labels-in-wpforms\/","title":{"rendered":"How to Change the Text Color for Field Labels in WPForms"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><p>Contact forms created with WPForms are a great way to gather information from your users and the BoldGrid Post and <a href=\"https:\/\/www.boldgrid.com\/wordpress-page-builder-by-boldgrid\/\">Page Builder Plugin<\/a> makes it easy to manage forms into your page content.&nbsp; However, the interaction between the two is not always seamless because of the nature of two distinct plugins loading their own style rules.<\/p>\n<p>Sometimes when working with WPForms in your page content you will find that the color of your field labels is the same as your section background, which makes it difficult for users to determine exactly what information is expected when filling out the form.&nbsp; The easiest way to fix these design conflicts is to <a href=\"https:\/\/www.boldgrid.com\/support\/boldgrid-themes\/how-to-use-the-custom-css-editor\/\">use your own CSS<\/a> to change the text color associated with your form fields.<\/p>\n<p>Fortunately WPForms assigns unique classes to the various page elements provided by the plugin, so you do not have to use long CSS selectors to target the items you want to modify.<\/p>\n<h2 id=\"modifying-the-field-labels-with-custom-css\">Modifying The Field Labels With Custom CSS<\/h2>\n<p>To use the class assignment for form field labels provided by WPForms start by creating this CSS selector:<\/p>\n<pre>.wpforms-field-label {\r\n\r\n}\r\n<\/pre>\n<p>Next add your color property and be sure to add !important to prevent any other rules from further modifying the color of your form field labels.<\/p>\n<pre>.wpforms-field-label {\r\n    color: #FFFFFF !important;\r\n}\r\n<\/pre>\n<p>Using #FFFFFF makes the labels white and you can change that value to any valid color hex to use any color you like.<\/p>\n<p>Once you have the custom CSS you wish to use, you should add it to the WordPress Customizer instead of the theme core files.&nbsp; Any changes made directly to the theme files can be overwritten when the theme updates. You can learn more about <a href=\"https:\/\/www.boldgrid.com\/support\/boldgrid-themes\/how-to-use-the-custom-css-editor\/\">how to apply your custom CSS in the WordPress Customizer<\/a>.<\/p>\n<p>If you want to change the color of all the text in your form, including the ones inside the input fields and submit button, please use the code below. The color used in this example is dark gray.<\/p>\n<pre>.wpforms-container .wpforms-form .wpforms-field-label,\r\n.wpforms-container .wpforms-form .wpforms-field-sublabel,\r\n.wpforms-container .wpforms-form input[type=text],\r\n.wpforms-container .wpforms-form textarea,\r\n.wpforms-container .wpforms-form button[type=submit] {\r\n    color: #333333;\r\n}\r\n<\/pre>\n<p>If you want to change other elements in your form, you may need to use your browsers developer inspector tools. Our video below will walk you thru how to find other CSS classes or IDs.<\/p>\n<p><iframe loading=\"lazy\" title=\"Using the Browser Inspector to add Custom CSS in BoldGrid\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/z7odYi68wZA?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><\/p>\n<p>Congratulations! You now know how to change the text color for field labels in WPForms. We have some additional guides if you are interested in learning more about our <a href=\"https:\/\/www.boldgrid.com\/wordpress-website-builder\/\">WordPress website builder<\/a>.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Contact forms created with WPForms are a great way to gather information from your users and the BoldGrid Post and Page Builder Plugin makes it easy to manage forms into your page content.&nbsp; However, the interaction between the two is not always seamless because of the nature of two distinct plugins loading their own style [&hellip;]<\/p>\n","protected":false},"author":880,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"How to Change the Text Color for Field Labels in WPForms","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[146],"tags":[],"class_list":["post-18246","post","type-post","status-publish","format-standard","hentry","category-boldgrid-inspirations-plugin-product-guide"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/880"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=18246"}],"version-history":[{"count":8,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18246\/revisions"}],"predecessor-version":[{"id":39805,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18246\/revisions\/39805"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=18246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=18246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=18246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}