Support » Plugin: Contact Form 7 Dynamic Text Extension » Counter Shortcode not Showing

  • Hi, i have writen this Shortcode

    add_shortcode('order_id_counter', 'counter_shortcode');
    // [order_id_counter] == +1 zählen
    // [order_id_counter mode="output"] == ausgeben
    function counter_shortcode( $atts ) {
    	if ($atts['mode'] != "" && $atts['mode'] != NULL) {
    		echo $_SESSION['order_counter'];
    	} else {
    		$_SESSION['order_counter'] += 1;
    	}
    }

    The Shortcode does well on a Test Page with:

    [order_id_counter]
    
    [order_id_counter mode='output']

    But if i use it in the Form like this:

    [dynamichidden auftrags_id_do "order_id_counter"]
    [dynamichidden auftrags_id "order_id_counter mode='output'"]

    And in the E-Mail like this:
    Auftragsnummer: [auftrags_id]

    It dosnt work, the Var is empty 🙁

  • The topic ‘Counter Shortcode not Showing’ is closed to new replies.