Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Shortcode contact fom 7 does not work

$
0
0

Replies: 0

I tried to integrate a shortcode with information obtained by $_POST, without any information when sending the email. What may be happening?

https://i.stack.imgur.com/muDX9.jpg

add_shortcode('cs7', 'cs7');
add_filter('wpcf7_posted_data', 'cs7',10, 1);
function cs7( $output) {
  $content = $_POST;
  for($i=1; $i < $content['itemCount'] + 1; $i++) {
  $quantity =  'item_quantity_'.$i;
  $name = 'item_name_'.$i;
  $output = $content[$quantity]. ' ' . $content[$name];
  return $output;
  }
}

Viewing all articles
Browse latest Browse all 59525

Trending Articles