-
AuthorPosts
-
November 11, 2015 at 12:14 am #533769
Hi!
I got a custom subject line based on the entry in the form.
See post here
https://kriesi.at/support/topic/form-email-subject-line/After the latest update 3.4 it doesn’t work anymore ?
I get the custom subject line but it doesn’t add the entry into it.
Code i used is as follow
add_filter('avf_form_subject','avia_change_mail_subject', 10, 3); function avia_change_mail_subject($subject, $new_post, $form_params) { $subject = "Table reservation request from " . urldecode($new_post['namn_'.(avia_form::$form_id - 1)]); return $subject; }
Thanx!
November 15, 2015 at 2:14 am #535978Hi Paul,,
Can you please hand me a WordPress administrator account or a FTP account? post it here as a private reply.
Regards,
JosueNovember 15, 2015 at 11:49 pm #536242Ok Thanx!
November 16, 2015 at 8:32 am #536362Hey!
Thanks for the access, can you indicate where’s the form in question?
Cheers!
JosueNovember 16, 2015 at 8:37 am #536366Hi thank you!
There are multiple forms (pretty much identical, apart from to which adress it goes) one on each page (restaurant)
the top right “valj restaurang” drop down menu you can find all the pages that contains a form.
It did work perfectly before the latest update, so i don’t think multiple form is the issue ?
Thanx!
November 19, 2015 at 1:52 am #538658Hi!
Form field
names
are now numeric based so the code should be updated to something like this:add_filter('avf_form_subject','avia_change_mail_subject', 10, 3); function avia_change_mail_subject($subject, $new_post, $form_params) { $subject = "Table reservation request from " . urldecode($new_post['avia_1_1']); return $subject; }
Assuming
name
will always be the first element in the form.Best regards,
JosueNovember 19, 2015 at 5:53 pm #539119Thanx!
I copied that and replaced the old code, but still no difference ? Should i add something to the above code ?
Thanx!
November 20, 2015 at 10:52 am #539412Should work now, check it.
Regards,
JosueNovember 21, 2015 at 1:46 am #540022Thank it works now, was there something i missed ? (i have more then one site that needs this code added)
November 21, 2015 at 1:56 am #540025The code that did the trick was the following:
add_filter('avf_form_subject','avia_change_mail_subject', 10, 3); function avia_change_mail_subject($subject, $new_post, $form_params) { $subject = "Table reservation request from " . urldecode($new_post['1_1']); return $subject; }
Cheers!
Josue -
AuthorPosts
- You must be logged in to reply to this topic.