Hello my friends,
How can we get POST php function code of the elements in the contact form ?
Thank you for replies.
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
Hello Ismael,
Yes, How can i capture telephone number(text field) in contact form for send sms. (without saving to the database)
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
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.
I fixed it with this code, but as if meaningless. (:
rawurldecode($new_post["1_1"]