cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
First letter uppercase
September 25, 2007
1:13 pm
Clément
Guest

Hi all,

In my form, I have a flied called "Name". For each submission, I'd like to have an uppercase for the first character.

Is it possible to:
- Obligate an uppercase with a function?
- Make use of the PHP function ucfirst() after the submission?

Thanks in advance a lot for your help and for this plugin.

September 25, 2007
8:33 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

To enforce a capital first letter I would two things:

  1. use proper regexp
  2. add a field specific custom err message to make it clear to the user what's expected

E.g.:

Name||^[A-Z]{1}.*$|err:Please make sure to use a <strong>capital first letter</strong> in your name!

September 26, 2007
1:16 pm
Clément
Guest

Thanks a lot for your reply and your help.

Best Regards.

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3748

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5347

Posts: 18717

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)