• 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: How to Capitalize "text field"

How to Capitalize "text field" 12 years 7 months ago #19184

  • deki
  • deki's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi I have 2 test fields that conains name and surename. Most of the ime visiors write with lowercase but I need to send an email confirmation with name and surename capitalizes (first letter uppercase).
Do anyone know how to style the
"Dear {Name:value} {Surname:value},"

thank you for any advice.
deki
The administrator has disabled public write access.

Re: How to Capitalize "text field" 12 years 7 months ago #19194

Hi Deki. Found any luck on this issue yet?
The administrator has disabled public write access.

Re: How to Capitalize "text field" 12 years 7 months ago #19214

  • upbm
  • upbm's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 34
  • Thank you received: 4
I try this and it seems to works but I am not expert in javascript

put this code as attribut for the field you want capitalize
onchange="this.value=this.value.toUpperCase();"
The administrator has disabled public write access.
The following user(s) said Thank You: deki

Re: How to Capitalize "text field" 12 years 7 months ago #19239

  • deki
  • deki's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
very thank you it work.
does it possible for you to have only the first letter in uppercase?(capitalize)
thank you
The administrator has disabled public write access.

Re: How to Capitalize "text field" 12 years 7 months ago #19273

  • upbm
  • upbm's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 34
  • Thank you received: 4
Found with google several possibilities:

Try to put this javascript code as attribut in the field
onchange="this.value=( this.value.charAt(0).toUpperCase()+this.value.substring(1).toLowerCase());"

Seem working for me, but not an expert with JS
Didier
The administrator has disabled public write access.

How to Capitalize "text field" 12 years 1 month ago #22182

  • imliving
  • imliving's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Hey Guys,

I couldn't get onchange to work but this did:
onkeyup="this.value=this.value.toUpperCase();"

Which capitalizes automatically after a user has pressed and released a character key, the release being the "onkeyup" action.

To make the first character upper and the rest lower takes more code, especially for names. Plus you need code to capture input like John O'Neill or Olivia Newton-John. Capping the first character won't work for these two examples. I've seen lengthy code to handle this but not in an RSForms environment. I want this too.

Rob
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!