Simple Output Function for a Selectmenu
-
Hello, first of all thank you very much for the great plugin! I have now marked some pages as favorites and would now like to output them as a list in an “HTML <select> tag”.
The whole thing should be output as a selection option in Contact Form 7 in the next step.
This is my current status:
I entered the shortcode “[menulist]” in CF7 and got the text “OUTPUT SELECT LIST WITH FAVORTIES”. But how do I get a simple output of the marked favorites?
// Manual: https://contactform7.com/2015/01/10/adding-a-custom-form-tag/ add_action('wpcf7_init', 'custom_add_form_tag_clock'); function custom_add_form_tag_clock() { wpcf7_add_form_tag('menulist', 'custom_post_select', true); } function custom_post_select($tag) { //global $post; $output = ccc_my_favorite_list_custom_template(); return $output; } // https://de.www.ads-software.com/plugins/my-favorites/ function ccc_my_favorite_list_custom_template( $my_favorite_post_id=false ) { return "OUTPUT SELECT LIST WITH FAVORTIES"; //$my_favorite_post_id; }
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Simple Output Function for a Selectmenu’ is closed to new replies.