Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #288878

    Hello

    Before using Enfold I was using forms form Contact Form 7 with an additional plugin “Contact Form DB”.
    Contact Form DB is able to save all informations that have been submitted, this way we can easily export very useful data that are used by marketing managers.

    Now I use Enfold forms, so I asked to the author of Contact Form DB if it is possible to get those data, and yes it is possible and it works.
    The problem is that when Enfold POST a form, the data fields are not properly encoded (I’m not talking the sent email, this one is ok)
    some special characters are not displayed nicely, eg:
    An email adresse look like this: name%40mydomain.com
    Spaces are: %20
    A [ is: %5B
    A ] is: %5B
    and so on…

    Please, kook at those two screenshots, they show you how data are posted and you will see that Contact Form 7 specials characters are urldecoded but not with Enfold…
    Some changes should be done into the class-form-generator.php file, but I don’t know how to do it… :(

    1/ Enfold
    Enfold Post

    2/ Contact Form 7
    CF7 Post

    Thank you

    #289041

    Hi pako69!

    I’m not quite sure what the question is. Support isn’t for customization of the theme files or its functions and in this case the contact form is working as designed.

    To change how it encodes the data you would need to hire a freelance developer to modify the contact form class and its helper functions where applicable.

    Regards,
    Devin

    #289074

    Hello Devin
    The question is about Enfold who not do not encode correcly special characters when he post a form.
    That’s not a customization at all :)
    Yes, it works but it works the wrong way it should be.
    Please tell Kriesi to look at this, I am almost certain he will understand what I mean.
    Thank you

    #289087

    As far as I know the data for forms is urldecoded in the send function and not when posted. So if you wanted it to work differently you would need to re-write how forms are processed not only by the shortcode but by the class-form-generator.

    #289129

    Yes Devin
    I allready seen that the data for forms are urldecoded in the send mail send function and fortunately otherwise mails mails would be unreadables :-)

    I look at the class class-form-generator but I do not know how ti change it to work properly.

    #289268

    That is my point as well :)

    Its not something that we could easily change and really we would have no intention of doing so at this point. The theme is compatible with Gravity Forms, contact form 7 etc and the only difference is the styling and drag and drop options vs the theme form builder.

    So it would be something for you to have customized by a developer or to use a different plugin. We try to accommodate as much as we can but re-writing a class doesn’t fall under the scope of what we can do via support.

    #289333

    I understand Devin :)
    By the way i’m still looking for what is wrong and discover that the problem is not with your php class, it’s the Ajax submit for the form.
    I totaly desactivated Javascript on my browser and send an email, so this one is only sent by PHP and it works fine: the special characters are ok… :)
    So i’m searching where is the script who do Ajax Post for the forms but it’s hard to find…

    #289346

    Found it!

    – File: /js/shortcode.js
    – Code:
    Yours: send.dataObj[name] = encodeURIComponent(value);
    > This code do the opposite of what we need, because it encodes, for instance, @ to %40

    mine: send.dataObj[name] = decodeURIComponent(value);
    > works (I mean it outputs well the special characters)
    http://www.the-art-of-web.com/javascript/escape/

    Maybe I’m the only one who needs this…

    #289593

    Glad you were able to find what you were looking for :)

    Its not something we often run into and the contact form/form builder elements are purposely left very simplistic since more complicated functionality like saving to a database or conditional logic is simply better handled by any dedicated form plugin.

    #289642

    “is simply better handled by any dedicated form plugin.”
    Yes, it’s Contact Form DB, but this plugin needs that the Ajax post values to be well encoded ;-)
    I do that, but I really don’t like to modify Enfold Cord fields

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘The informations submitted with forms are not decoded’ is closed to new replies.