Second Shortcode Attribute needed
-
Hello,
I use Shortcode Attributes as in:
https://contactform7.com/getting-default-values-from-shortcode-attributes/
-> which is working perfectly fine so far.
But now I need a second Shortcode Attribute for the same form.Could you please be so kind as to provide the additional code which I have to put in the function.php? I cannot figure out, where and how to add the second attribute (which might for example be named “subject”) in the function:
add_filter( ‘shortcode_atts_wpcf7’, ‘custom_shortcode_atts_wpcf7_filter’, 10, 3 );
function custom_shortcode_atts_wpcf7_filter( $out, $pairs, $atts ) {
$my_attr = ‘destination-email’;if ( isset( $atts[$my_attr] ) ) {
$out[$my_attr] = $atts[$my_attr];
}return $out;
}I tried a few things, but didnt work.. (I am not a php-expert :-/)
Thank you very much for your help
manuka
- The topic ‘Second Shortcode Attribute needed’ is closed to new replies.