Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Remove text-block after sending a email #397081

    Hi Elliott,

    great, thanks! That’s fantastic. I didn’t recognize that input type.
    It works perfectly.

    With best regards,
    Thomas.

    in reply to: Process form params instead sending via e-mail #305342

    Okay, I got it. Thank you very much.

    But I ran into another problem. With the inserted code the data of ALL forms is now processed. But I need to distinguish between a contact form and my custom form.
    Is there an option in the theme for distinguishing between two forms? I checked both with FireBug and both forms have the following ID:
    avia_generated_form1 1

    in reply to: Process form params instead sending via e-mail #305332

    Thank you, Peter.
    I will try.

    in reply to: Process form params instead sending via e-mail #305293

    Thanks for your quick answer.

    I copied your code, but it does not have an impact on the result:

    			//hook to stop execution here and do something different with the data
    			$message = "TEST";
    			
    			add_filter('avf_form_send', 'avia_process_form_data', 10, 3);
    			function avia_process_form_data($send, $new_post, $form_params)
    			{
    				foreach ($new_post as $current_key => $current_post)
    				{
    					//loop through all contact form fields. $current_key contains the field name, $current_post the corresponding value.
    					$message .= "test";
    				}
    				return true;
    			}
    			
    			$proceed = apply_filters('avf_form_send', true, $new_post, $this->form_params);			
    			if(!$proceed) return true;

    I commented the $message = ""; out below in the code. But the content of my mail is still the same as before.

    • This reply was modified 10 years, 3 months ago by tludwig.
    in reply to: Post values of contact form #302801

    Thanks for your answer. I will try it.

    EDIT:
    Dear Josue,

    I am familiar with coding php, but developing WordPress is new to me.
    I know that I need to add a filter, but I am not sure where and especially how.

    Might you please give me a hint?

    With best regards,
    Thomas.

    • This reply was modified 10 years, 3 months ago by tludwig.
Viewing 5 posts - 1 through 5 (of 5 total)