I need a couple of improvements to the contact form:
make subject field mandatory
change the the subject of the e-mail i receive. Now the subjects of all e-mails sent trough the contact form is "[Caligrafik Studios] New Contact Form message has been received". I want the e-mail subject to be the same as the Subject input from the contact form.
The two files that I've sent you to replace you don't need to worry about when the new update is available, only the line of code you will need to have the subject field required.
If you don't see the change immediately, please hard-refresh your browser (CTRL/CMD+R) because it takes longer to load the changes, as they are saved in browser cache. Another option is to open new private/incognito window and try if it works.
To change the subject to default typed subject add this code in functions.php
function set_subject_in_contact_form_mail( $subject, $data ) {
the email i receive has the label i've set for the subject input; i.e., all emails i get have the subject "Subiect." instead of what the user wrote in that input.
I cleared the cache and now the subject field is mandatory but the sending does not work. After I click Send the progress bar stops near the end and I don't get the message in my inbox.
Managed to fix it. Please try now, it should work.
If you don't see the change immediately, please hard-refresh your browser (CTRL/CMD+R) because it takes longer to load the changes, as they are saved in browser cache. Another option is to open new private/incognito window and try if it works.
The UX problem with this is I get multiple messages nested in the same conversation and when replying to a customer, they see "Re:New Contact form message has been received" instead of what they actually typed in the Subject field.
Some feedback regarding this problem, as working UI & UX designer: don't add to many options for micro-adjustments to the theme to avoid it becoming to bloated. It seems natural to assume the Subject field should become the default subject of the email. Don't think there's need for an extra checkbox for that.
Another, better solution i think would be to add support for Contact Form 7. That would make things much clearer and simpler.
Thanks for your suggestions. This element will be deprecated, so I have added that "extra checkbox" to use subject field (which can be named to anything) to email subject.
We are planning to move this functionality to CF7 and fix this issue now and forever, so for now will leave as it is.
I really appreciate your input, if you have other suggestions feel free to tell us.
The e-mail I get has the subject "[Caligrafik Studios] New Contact Form message has been received" altough I've checked that option to use the subject input as email subject.
I need a couple of improvements to the contact form:
Is this do-able?
Hi Calin,
To make the subject field please replace these files:
1. Download this file and replace it in this directory (of the theme): /wp-content/themes/kalium/vc_templates/
2. Download this file and replace it in this directory (of the theme): /wp-content/themes/kalium/assets/js
Then add the following line in functions.php to make Subject field required:
The two files that I've sent you to replace you don't need to worry about when the new update is available, only the line of code you will need to have the subject field required.
If you don't see the change immediately, please hard-refresh your browser (CTRL/CMD+R) because it takes longer to load the changes, as they are saved in browser cache. Another option is to open new private/incognito window and try if it works.
To change the subject to default typed subject add this code in functions.php
Hi,
I made the changes but this doesn't seem to work.
Hi Calin,
1. Have you replaced custom.min.js file properly at assets/js/ folder? If not, please try again:
Download this file and replace it in this directory (of the theme): /assets/js/
2. I see, please try this fix and you should be able to view the current subject from contact form:
Download this file and replace it in this directory (of the theme): /inc/lib/vc/lab_contact_form
Hi,
I made the changes.
The subject field is still not mandatory.
The subject now shows up in my mail as plain text but it does not become the subject of the e-mail i get.
Any other ideas?
Hi Calin,
I've added these files again and the problem seems to be solved, you can check it and see if it works for you as well.
(view large version)
I cleared the cache and now the subject field is mandatory but the sending does not work. After I click Send the progress bar stops near the end and I don't get the message in my inbox.
Hi Calin,
Managed to fix it. Please try now, it should work.
If you don't see the change immediately, please hard-refresh your browser (CTRL/CMD+R) because it takes longer to load the changes, as they are saved in browser cache. Another option is to open new private/incognito window and try if it works.
I get the message, i see the subject field in the body text but the actual email does not have the right subject. I've attached a screenshot.
Hi Calin,
Do you want the subject to replace that "New Contact form message has been received"?
If so add this code in functions.php:
Tried it. Tested. The email subject is the same.
The UX problem with this is I get multiple messages nested in the same conversation and when replying to a customer, they see "Re:New Contact form message has been received" instead of what they actually typed in the Subject field.
Hi Calin,
I've fixed this, it I've changed one line of code and it worked for me. So the fix will be available in the next release.
Did you apply the change to my site aswel or I have to wait for the next release?
Yes, changes will be applied for the next update.
We are going to implement an option to use "subject" field as subject in VC element editor popup.
Ok. When's it coming?
We have planned to release this update later this week.
Ok. Thanks for the help.
Some feedback regarding this problem, as working UI & UX designer: don't add to many options for micro-adjustments to the theme to avoid it becoming to bloated. It seems natural to assume the Subject field should become the default subject of the email. Don't think there's need for an extra checkbox for that.
Another, better solution i think would be to add support for Contact Form 7. That would make things much clearer and simpler.
Hi Calin,
Thanks for your suggestions. This element will be deprecated, so I have added that "extra checkbox" to use subject field (which can be named to anything) to email subject.
We are planning to move this functionality to CF7 and fix this issue now and forever, so for now will leave as it is.
I really appreciate your input, if you have other suggestions feel free to tell us.
Guys, I've updated the theme to the latest version and this problem is back... Please check and tell me how to fix this.
Thanks.
Hi Calin,
Can you please tell me what is the problem now?
The e-mail I get has the subject "[Caligrafik Studios] New Contact Form message has been received" altough I've checked that option to use the subject input as email subject.
Hi Calin,
I have checked contact form, so it shows the subject.
(view large version)
However to change the format of Subject, please use the code that I gave you previously, insert it in functions.php
Yes, I upgraded to 2.0.3.1 and it works fine now. Thanks.
Hi Calin,
Glad to hear that
Have a nice week and Happy Holidays!
Will set this ticket as solved from here.