Viewing 29 posts - 1 through 29 (of 29 total)
  • Author
    Posts
  • #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

    #545502

    Hi 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,
    Elliott

    #547432

    Hey Elliott,

    Thx for the solution, but where and how can I find that file to replace it? ;-)

    grt Boris

    #547462

    Hi!

    You can locate it in your Enfold theme folder via FTP.

    Best regards,
    Dake

    #556248

    Hey Dake,

    Ok, thx, will try it!

    grt Boris

    #556337

    Hey!

    You’re welcome.

    Keep us posted on the results :)

    Cheers!
    Dake

    #1241994

    Hey 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

    #1242121

    Hi Borissimo,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1244113

    Hey 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

    #1244133

    Hi 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,
    Nikko

    #1246133

    Hey 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

    #1246140

    Hey 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, 2 months ago by Borissimo. Reason: found the file and edited it
    #1246257

    Hi Boris,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. 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 ).
    5. Click ” Submit “.
    6. 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,
    Nikko

    #1249757

    Hey 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

    #1249831

    Hi 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,
    Nikko

    #1250042

    DAMN, 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, 1 month ago by Borissimo.
    #1250053

    Really 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…

    #1250067

    Please help me with this ASAP :-S

    #1250185

    Hi 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, 1 month ago by Nikko.
    #1250218

    Hey Nikko,

    I’ve managed to fix it now.
    But the reason we started this, is now not fixed yet :-S

    grt Boris

    #1250224

    Hi 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,
    Nikko

    #1250617

    Hey 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

    #1250714

    Hi 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,
    Nikko

    #1255852

    Hey 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

    #1256014

    Hi Borissimo,

    Then you’ll have to use id instead of label.
    You can get them from inspecting the element via web inspector.

    Best regards,
    Nikko

    #1256025

    Hey Nikko,
    Ok, thx for the advice, but I’m not tech savvy in CSS haha.
    So could you please show me? ;-)
    grt Boris

    #1256054

    Hi 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_1

    Best regards,
    Nikko

    #1256135

    Hey Nikko,

    Well that maybe tells me the ID, but not the whole CSS code!? ;-)

    grt Boris

    #1256258

    Hi 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

Viewing 29 posts - 1 through 29 (of 29 total)
  • You must be logged in to reply to this topic.