-
AuthorPosts
-
July 9, 2014 at 8:35 am #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
2/ Contact Form 7
Thank you
July 9, 2014 at 3:22 pm #289041Hi 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,
DevinJuly 9, 2014 at 4:17 pm #289074Hello 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 youJuly 9, 2014 at 4:46 pm #289087As 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.
July 9, 2014 at 5:34 pm #289129Yes 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.
July 10, 2014 at 1:22 am #289268That 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.
July 10, 2014 at 6:07 am #289333I 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…July 10, 2014 at 6:56 am #289346Found 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 %40mine:
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…
July 10, 2014 at 4:53 pm #289593Glad 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.
July 10, 2014 at 5:43 pm #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 -
AuthorPosts
- The topic ‘The informations submitted with forms are not decoded’ is closed to new replies.