Reputation: 143
I am trying to implement a WP Elementor form with a custom shortcode. I want to send the form submission to a dynamic email using a shortcode and here is the custom shortcode.
function agent_email_func(){
$id = $_GET['id'];
$id = get_userdata($id);
$html = $id->user_email;
return $html;
}
add_shortcode('agent_email','agent_email_func');
The above shortcode generates only an email address. For example, [email protected] nothing else. If I use static email without any shortcode, the form is submitted successfully.
Upvotes: 0
Views: 63