cforms II User Forum

Registration is currently disabled.


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
CC optional and mail required... design error?
November 21, 2007
1:39 am
  • The URL: but page is offline
  • Browser (and version): IE6 but it shouldn't matter
  • cforms version: 6.1
  • possibly other plugins that might interfere: 
    • None I think
  • Do you get an error message (e.g. use Firebug):
    • No

[desc]: Hello I'd like to signal what I think is a… glitch in the way things are designed. At least that's what it looked like to me, but maybe I'm wrong.

Suppose I want to make Email input optional for my visitor. This is perfectly understandable. Unfortunately, if I make a field of type Email, it IS required, even if I don't choose so with the corresponding checkbox during design phase! You may object I can then choose to make the "email" field a simple text field… true but the point is:

I'd like to offer the option to my visitors to give me their mail address or not, but if they do, I would like to offer them the option to receive a copy of the message!

And you can see that: if I choose an "email" field and a "CC me" field, everything works, but users are forced to enter an email even if they don't want a copy of the message, and viceversa if I put a "text" field and a "CC me" field, even if the user puts a valid email and choose to be cc-fied, the email is not sent!!!

I believe there should be a way to tell the "CC me" field which field to use for his mailing address or the option to make the "email" field not required to fulfill needs like mine…

Does this post make sense, Nicky? I hope so, please let me know if I haven't been clear… Thank you so much!

November 21, 2007
7:42 am
Munich, Germany
Forum Posts: 6400
Member Since:
March 6, 2005

Marco, that's right, the email field – if used – is always required and checked against a valid email format.

The use case you're outlining is currently not supported, so it's either a mandatory email input field or a regular text field, which kills the options to allow the user to be CC'ed.

It should be relatively easy however to allow an empty email field, I'll consider it for v6.2

 By the way, you post made total sense, Nicky told me :-)

November 21, 2007
7:57 am

Embarassed Laughing

Thankx, not bad for a post written at almost 2 in the morning!

Seriously speaking Oliver, I was thinking that there must be some piece of code where you wrote a check for the mail field that makes it forced. Actually there should be twice (correct me if I'm wrong): one "built-in" in the "Email object" and another the standard optional required checkbox, which I assume is still valid also for email object.

I am thinking about hacking your code and disabling the built in check. Probably if you have to CONSIDER allowing an empty email field if means that your code design assumes the email is always present, and it makes for unhandled errors in case one designs an empty email field that gets used, but I'm willing to take the risk for my site: after all I use cforms only for that small contact form I told you about.

I know your plugin can do much much more and (ian italian saying I don't know if it's similar in english) I am shooting flies with a cannon, but I like your plugin so much I don't want to do without. So, I didn't read your plugin policy but, if it is free to hack with and if you don't mind, I'd appreciate if you could point me to the php or js file where you implemented that check… Thank you so much!!!

November 23, 2007
6:21 pm

Hey Oliver,

 Sorry to bump this post up, I won't do anymore but… I don't know if you noticed my question in the last post… is it possible to know at which point of the code you implemented the "auto-required" check for the email field?

If not, I'll stay quietly in the corner waiting for 6.2… Wink



November 23, 2007
6:28 pm
Munich, Germany
Forum Posts: 6400
Member Since:
March 6, 2005

Sorry, I thought I had answered your question already. It's in v6.2, already working, and will be released either later today or tomorrow. :-)

Re. Hacking my code: Please note that I do have a copyright on the code (although I offer it at no costs, it is not GPL).

November 26, 2007
7:17 am

Hello Oliver,

 Sorry I did not notice your code was copyrighted ('cause most plugins are free to change), however no problem, I will refrain to do so!

Thanks again for your job!


Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
21 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: 3763

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5359

Posts: 18742

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

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

Administrators: Oliver (6400), Nicky (3)