Add full name to the message email notification

I’m trying to add full_name field to reply form.

this is my full nam field code

add_filter(
    'hivepress/v1/forms/message_send',
    function( $form ) {
        // Adding a full name field
        $form['fields']['full_name'] = [
            'label'     => esc_html__( 'Full Name', 'hivepress-messages' ),
            'type'      => 'text',
            'required'  => true,
            '_order'    => 1,
        ];

        return $form;
    }
);

where is located ‘hivepress/v1/forms/message_send’ and how to implement it?
Field shows on front end, but during testing ONLY message content arrives to email.

Hi,

Yes, this is the expected behavior because you need to add a field and store its value somewhere. We recommend using another solution, as it is currently not possible to use the reply form without logging in. Please try using this snippet, which will add the first and last name during registration: Add first and last name fields to the user registration form #hivepress #users · GitHub

Then you can try to customize this email event and add tokens to it: %sender.first_name%, %sender.last_name% or %sender.full_name% How to customize emails - HivePress Help Center.

​I hope this is helpful to you.

Is it possible to add more fields to email? I can add fields to show on front end in form but how can I make sure it sends information to email when user clicks send?

Hi,

If you mean tokens for emails, then yes, it is possible, but it will require a custom implementation.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.