Posted: January 9, 2019 at 2:19 pm
|
I’d like to have the end-user type in all caps or at least upper case the first letter of their name fields, etc. I know I can accomplish this with some CSS magic but the problem is that I need the exported data dump csv file to reflect this and don’t want to have to fix this later in Excel. Is there any way to have the database accomplish this? |
Hi there, The quickest way to achieve this is to just change all of the strings to uppercase when exporting the CSV, that will leave all of the values however the user inputs them in EE but on export, you get the values in uppercase. You can do that with a snippet like this: https://gist.github.com/Pebblo/59af08753b201dbabd70a8b04217d783 You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
|
That is great. I made some slight modifications and am very happy with this:
However, can you specify the “Email Address” field to be lower case? If not, it’s ok. Thanks! |
Just to note, in your opening post you have:
All caps being preferred would use strtoupper(), first letter of each word can use ucwords(). Either is fine just noting for any other users.
Sure, just check
|
|
|
Thanks, Tony! With a little for manipulation, I got this to work just the way I needed. For anyone else looking, throw this into your theme’s function.php file:
|
Great, I’m glad you got it working. One change I would make is to NOT put this in my https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ There’s often debates on The reason to do so is that if you ever change your theme, you now lose all of the functionality you placed in Most functions will work in |
|
The support post ‘Exported CSV Fields – Fixing Lettering Format’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.