Kamalpreet Singh
Kamalpreet Singh

Reputation: 143

Wp Elementor form submit to an email with custom Shortcode

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.

enter image description here

Upvotes: 0

Views: 63

Answers (0)

Related Questions