{"id":21796,"date":"2012-10-16T22:28:28","date_gmt":"2012-10-16T22:28:28","guid":{"rendered":"https:\/\/toolset.com\/?post_type=course-lesson&#038;p=21796"},"modified":"2020-11-16T10:06:36","modified_gmt":"2020-11-16T10:06:36","slug":"conditional-display-for-form-inputs","status":"publish","type":"course-lesson","link":"https:\/\/toolset.com\/fr\/course-lesson\/conditional-display-for-form-inputs\/","title":{"rendered":"Conditional Display for Form Inputs"},"content":{"rendered":"\n<p>You can display or hide elements of the form based on the values of custom fields and taxonomy inputs.<\/p>\n\n\n\n<p>To add\u00a0a<strong>\u00a0Conditional group<\/strong>\u00a0to your forms, use the following steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Drag-and-drop a&nbsp;<strong>Conditional group<\/strong>&nbsp;element from the&nbsp;<strong>Extra elements<\/strong>&nbsp;panel into the forms.<\/li><li>Move the&nbsp;<strong>Conditional group<\/strong>&nbsp;to a correct&nbsp;location within the form.<\/li><li>Drag-and-drop one or more fields into the&nbsp;<strong>Conditional group.<\/strong><\/li><\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"d732813e4ebbea154cfcf244b264de1a\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2019\/02\/toolset-forms-conditional-group-insert-steps.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2019\/02\/toolset-forms-conditional-group-insert-steps-500x306.png\" alt=\"Toolset Form - Define the Part Of the Form You Want To Display Conditionally\" class=\"wp-image-1196692\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Toolset Form &#8211; Define the Part Of the Form You Want To Display Conditionally<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<p>You can add any number of fields into the&nbsp;<strong>Conditional group<\/strong>. Click to expand the options for the inserted&nbsp;<strong>Conditional group&nbsp;<\/strong>and add your conditions.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"1efaacf234a2cf99396e16f436b07e42\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2019\/03\/toolset-forms-conditional-group-options.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2019\/03\/toolset-forms-conditional-group-options-500x273.png\" alt=\"Toolset Forms - Conditional Group Options\" class=\"wp-image-1218012\"\/><\/a><\/figure>\n<\/div>\n\n\n<p>You can include any number of conditions and connect them with AND or OR conditions. For fine tuning, you may also enter a textual argument for the conditional display. For more complex display logic, you can write&nbsp;<a href=\"https:\/\/toolset.com\/documentation\/programmer-reference\/forms\/cred-conditional-display-engine\/\">custom expressions<\/a>.<\/p>\n\n\n\n<p class=\"alert alert-warning\">You should avoid using conditions that use special characters like single quotes, double quotes, or dollar signs. Such conditions may&nbsp;<a href=\"https:\/\/toolset.com\/errata\/conditionals-including-special-characters-might-fail\/\">fail to evaluate<\/a>.<\/p>\n\n\n\n<p>You can create nested conditions but not using the drag-and-drop editor. To create nested conditionals, switch to the&nbsp;<strong>Expert mode&nbsp;<\/strong>and enter the nested conditions manually.<\/p>\n","protected":false},"author":4341,"featured_media":1664483,"template":"","related-lesson":[8429],"class_list":["post-21796","course-lesson","type-course-lesson","status-publish","has-post-thumbnail","hentry","related-lesson-post-forms"],"_links":{"self":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/21796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson"}],"about":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/types\/course-lesson"}],"author":[{"embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/users\/4341"}],"version-history":[{"count":8,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/21796\/revisions"}],"predecessor-version":[{"id":1680349,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/21796\/revisions\/1680349"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/media\/1664483"}],"wp:attachment":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/media?parent=21796"}],"wp:term":[{"taxonomy":"related-lesson","embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/related-lesson?post=21796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}