WordPress Contact form 7 how add custom shortcodes to form?

enter image description here

I’m trying to add a function shortcode for contact form 7, but not working

Does anyone know how you would go about being able to do this in CF7?

Function

function cs7() {
$content = $_POST;
for($i=1; $i < $content['itemCount'] + 1; $i++) {
$name = 'item_name_'.$i;
$quantity =  'item_quantity_'.$i;
$price = 'item_price_'.$i;
echo $content[$quantity]. ' ' . $content[$name] . $content[$price] .'<br/>';
}
}
add_shortcode('cs7', 'cs7');

Read more here:: WordPress Contact form 7 how add custom shortcodes to form?

Leave a Reply

Your email address will not be published. Required fields are marked *