{"id":16239971,"date":"2022-11-28T10:18:56","date_gmt":"2022-11-28T10:18:56","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/wpcf7_add_form_tag-not-working-4\/"},"modified":"2022-11-28T10:18:56","modified_gmt":"2022-11-28T10:18:56","slug":"wpcf7_add_form_tag-not-working-4","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/wpcf7_add_form_tag-not-working-4\/","title":{"rendered":"wpcf7_add_form_tag not working"},"content":{"rendered":"<p>I copy the code from cf7 doc to functions.php but not working<\/p>\n<p>https:\/\/contactform7.com\/2015\/01\/10\/adding-a-custom-form-tag\/<\/p>\n<p>`add_action( &#8216;wpcf7_init&#8217;, &#8216;custom_add_form_tag_clock&#8217; );<\/p>\n<p>function custom_add_form_tag_clock() {<br \/>\n  wpcf7_add_form_tag( &#8216;clock&#8217;, &#8216;custom_clock_form_tag_handler&#8217; ); \/\/ &#8220;clock&#8221; is the type of the form-tag<br \/>\n}<\/p>\n<p>function custom_clock_form_tag_handler( $tag ) {<br \/>\n  return date_i18n( get_option( &#8216;time_format&#8217; ) );<br \/>\n}<\/p>\n<p>WordPress and Contact form 7 are all latest version.<\/p>\n","protected":false},"template":"","class_list":["post-16239971","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16239971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16239971\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16239971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}