-
AuthorPosts
-
December 1, 2015 at 3:50 am #544966
Hi there,
Is there a way to remove the labels in the email I receive, once someone filled out my contact form?
For instance, instead of seeing the word ‘name’ and then his name, just seeing his name (without the word ‘name’ in front of it) !?grtz Boris
December 1, 2015 at 7:22 pm #545502Hi Boris!
In the /enfold/framework/php/class-form-generator.php file change line 870 from this.
$message .= $element['label'].": ".$field_value." <br/>";
To this.
$message .= $field_value." <br/>";
Regards,
ElliottDecember 5, 2015 at 2:23 pm #547432Hey Elliott,
Thx for the solution, but where and how can I find that file to replace it? ;-)
grt Boris
December 5, 2015 at 6:43 pm #547462Hi!
You can locate it in your Enfold theme folder via FTP.
Best regards,
DakeDecember 22, 2015 at 1:43 am #556248Hey Dake,
Ok, thx, will try it!
grt Boris
December 22, 2015 at 5:46 am #556337Hey!
You’re welcome.
Keep us posted on the results :)
Cheers!
DakeAugust 30, 2020 at 7:53 pm #1241994Hey Enfold team,
The above solution doesn’t work anymore :-( At least, I tried to find that line in the “class-form-generator.php”, but I couldn’t find it :-(
Is that because of an update in the theme maybe?Can you please help!?
grt Boris
August 31, 2020 at 12:02 pm #1242121Hi Borissimo,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaSeptember 8, 2020 at 12:24 am #1244113Hey Victoria,
Thx for your quick reply, sorry about my late one, I didn’t get (or see) the notify email ;-P
The link is in the private part…
grt Boris
September 8, 2020 at 4:05 am #1244133Hi Boris,
If you are using Enfold 4.7.6.3, find this code in wp-content > themes > enfold > framework > php > class-form-generator.php (line 1163):
$form_field .= $element['label'] . ': ' . $field_value . ' <br/>';
replace with:
$form_field .= $field_value . ' <br/>';
Hope it helps.
Best regards,
NikkoSeptember 16, 2020 at 1:14 am #1246133Hey Nikko,
Thx, sorry for the late reply, the notification keeps ending up in my spam, so I didn’t know ;-P
I’m gonna try now :-)grt Boris
September 16, 2020 at 3:57 am #1246140Hey Nikko,
I am using a Child Theme from Enfold and I edited that file, on the line you told me to, but in the email it still shows the ‘labels’ :-(E-Mail: ********
Naam: *****
Telefoonnummer: ******
Onderwerp: *****Bericht: en nu dan?
So it didn’t work :-S
grt Boris- This reply was modified 4 years, 3 months ago by Borissimo. Reason: found the file and edited it
September 16, 2020 at 11:00 am #1246257Hi Boris,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( to be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.Best regards,
NikkoOctober 1, 2020 at 2:10 am #1249757Hey Nikko,
I’ve added you guys as the user ‘enfold’…
But the email ” (Email address hidden if logged out) ” didn’t work? I got an email it bounced :-S
grt Boris
October 1, 2020 at 9:46 am #1249831Hi Borissimo,
Thanks for giving us admin access.
However I apologize for the mistake I made, I added this code in your child theme’s functions.php (line 8):include_once "class-form-generator.php";
which is causing issue, it should be replaced with:
include_once get_template_directory_uri() . "/class-form-generator.php";
I really apologize for it.
Best regards,
NikkoOctober 2, 2020 at 1:05 pm #1250042DAMN, not good man, really not happy with this!! This is costing me revenue too! :-S
And I can’t get into the site anymore, how can I fix this then???
- This reply was modified 4 years, 2 months ago by Borissimo.
October 2, 2020 at 1:21 pm #1250053Really weird, because I can visit the site on every page, except the /tarieven one (the most visited one and the login page for WP!! I’ve changed the file like you said, through SFTP…
October 2, 2020 at 1:38 pm #1250067Please help me with this ASAP :-S
October 2, 2020 at 6:45 pm #1250185Hi Borissimo,
Can I request for FTP access? I can fix it if I have FTP access or cPanel.
Best regards,
Nikko- This reply was modified 4 years, 2 months ago by Nikko.
October 3, 2020 at 2:33 am #1250218Hey Nikko,
I’ve managed to fix it now.
But the reason we started this, is now not fixed yet :-Sgrt Boris
October 3, 2020 at 4:35 am #1250224Hi Borissimo,
I see, please do the following on the child theme:
– remove this code in class-form-generator.php (line 1):if ( ! defined( 'AVIA_FW' ) ) { exit( 'No direct script access allowed' ); }
do not remove
– in functions.php, remove this code I gave:
include_once get_template_directory_uri() . "/class-form-generator.php";
with:
require_once( get_stylesheet_directory(). '/class-form-generator.php' );
Best regards,
NikkoOctober 5, 2020 at 4:43 pm #1250617Hey Nikko,
That finally worked, thx!
Is there a way I can leave some labels out but let some labels remain or is it all or nothing?grt Boris
October 6, 2020 at 6:58 am #1250714Hi Boris,
I’m glad to hear that.
As for the labels, you can use if statement as well as $element[‘label’]
For example in the Contact Form, you have Form Element Label with the value of Name and you want it to show and the others are without a label, you can change:$message .= $field_value." <br/>";
to
if( $element['label'] == 'Name' ) { $message .= $element['label'].": ".$field_value." <br/>"; } else { $message .= $field_value." <br/>"; }
Best regards,
NikkoOctober 26, 2020 at 9:50 pm #1255852Hey Nikko,
And if I want to have the name, adress and phonenr without a label and the rest with a label, how do I do that?
grt Boris
October 27, 2020 at 12:32 pm #1256014Hi Borissimo,
Then you’ll have to use id instead of label.
You can get them from inspecting the element via web inspector.Best regards,
NikkoOctober 27, 2020 at 12:49 pm #1256025Hey Nikko,
Ok, thx for the advice, but I’m not tech savvy in CSS haha.
So could you please show me? ;-)
grt BorisOctober 27, 2020 at 1:53 pm #1256054Hi Boris,
Do the following steps:
1. Right click on the textfield, and choose Inspect
2. It should open up like this: https://imgur.com/w9Nv62v
Just find the ID, in the screenshot it’s avia_1_1Best regards,
NikkoOctober 27, 2020 at 4:17 pm #1256135Hey Nikko,
Well that maybe tells me the ID, but not the whole CSS code!? ;-)
grt Boris
October 28, 2020 at 4:35 am #1256258Hi Boris,
I see, I apologize, the code you would use would look something like this:
if( $element['id'] == 'avia_1_1' ) { $message .= $element['id'].": ".$field_value." <br/>"; } else { $message .= $field_value." <br/>"; }
I’ll also just correct, this is a PHP code and must be put in PHP files and not in Quick CSS or any css files.
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.