• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: emailfield lowercase

emailfield lowercase 10 years 10 months ago #27877

Goodmorning

A small problem:
In a form I use a field called emailaddress.
It has validation with DNS and in the additional attributes I have style="text-transform: lowercase;"

When I enter for example This e-mail address is being protected from spambots. You need JavaScript enabled to view it on the screen This e-mail address is being protected from spambots. You need JavaScript enabled to view it displayed.
So far so good.

But in the database and in the administrator-mail the capitals are seen :(

Putting code around the email like:

<td><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: 10pt; text-transform: lowercase;">{email:value}</span></span></td> doenst result in an email with lowercase.

I did the same for the postalcode which I like to be Uppercase like 1213 XX instead of 1213xx and that is working fine.

Does anyone have an idea what to do?
The administrator has disabled public write access.

emailfield lowercase 10 years 10 months ago #27885

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
You can achieve this using the strtolower php function in the script on form process.
$_POST['form']['field_name'] = strtolower($_POST['form']['field_name']);

For upper case , you can use the strtoupper function like in the following example:
$_POST['form']['field_name'] = strtoupper($_POST['form']['field_name']);
My help is not official customer support. To receive your support, submit a ticket by clicking here
The administrator has disabled public write access.
The following user(s) said Thank You: mindacademy

emailfield lowercase 10 years 10 months ago #27890

That was exactly what I needed, thank you very much Cosmin!
Last Edit: 10 years 10 months ago by mindacademy. Reason: Missspelt the name by accident
The administrator has disabled public write access.

emailfield lowercase 9 years 6 months ago #32733

Is there a way of using ucwords with this code? I need each word in lower case but with capitals.

I tried adding this but it didn't work. (winner=field_name)

$_POST = ucwords($_POST);
The administrator has disabled public write access.

emailfield lowercase 9 years 6 months ago #32743

  • bogdan.tataru
  • bogdan.tataru's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 174
  • Thank you received: 40
You can try achieving this using the ucwords along with strtolower php function in the script on form process:

$_POST['form']['field_name'] = ucwords(strtolower($_POST['form']['field_name']));
My help is not official customer support. To receive assistance, submit a ticket by clicking here
The administrator has disabled public write access.
The following user(s) said Thank You: BeLlSiBuB

emailfield lowercase 9 years 6 months ago #32758

Works perfectly. Thankyou

Do you know the code to format a comments field so the first letter of each sentence is a capital and the rest in lower case please?
Last Edit: 9 years 6 months ago by BeLlSiBuB.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!