Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1318172

    Hello my friends,

    How can we get POST php function code of the elements in the contact form ?

    Thank you for replies.

    #1318392

    Hey koraytastan,

    Thank you for the inquiry.

    We are not really sure what you are trying to do here. Are you trying to extract or capture the data sent from the contact form? If yes, then you might be able to use the avf_form_send filter to do something with the form data (ex. save it to the database) before sending it to the recipient. There are also other filters that you can use to adjust the email subject, message, from address etc.

    Best regards,
    Ismael

    #1318500

    Hello Ismael,

    Yes, How can i capture telephone number(text field) in contact form for send sms. (without saving to the database)

    #1318623

    Hi,

    Thank you for the update.

    Are you using any API to send SMS? With the current contact form configuration in the page above and if you are going to use the avf_form_send filter, you can access the value of the telephone number from the $new_post array as shown in the example below.

    function avf_form_send_mod($send, $new_post, $params, $class) {
    	// $new_post["4_1"] - this variable will hold the phone number value
            // do something with it before sending the email
    	return true;
    }
    add_filter("avf_form_send", "avf_form_send_mod", 10, 4);
    

    Best regards,
    Ismael

    #1318720

    Hi Ismael,

    Thank you for reply. It’s work but there is a small problem. $new_post[“1_1”] string (ex. “ŞĞÜ) it seems as UTF-8 Hex (ex. like %C5%9F%C4%9F ) in sms. But no problem for mail body. It’s working correct. Can you handle this little problem ?

    Thanks.

    #1318722

    I fixed it with this code, but as if meaningless. (:

    rawurldecode($new_post["1_1"]

    #1319047

    Hi,

    Alright. Glad to know that it is fixed. Please feel free to open another a thread if you need anything else. We will close this one for now.

    Have a nice day.

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Contact form elements via php functions’ is closed to new replies.