• Hi,

    While I understand why [text* your-email] & the corresponding [your-email] is not a technically valid Reply-To field (as described on https://contactform7.com/configuration-errors/invalid-mailbox-syntax/ ), a lot of people prefer to have just one input field for contact info, to which the user can either type an e-mail, phone number or anything other in text.

    Having the above field generate error warnings is a bit too much as this may be intended by the developer. Even if the admin would try to reply to an erroneous email address, he would get an instant error in his inbox.

    Your current mechanism enforces using a different form field for the email, which means there needs to be another one for the phone number and maybe some other types of communication (like skype). Then the requiredness problem comes into play: when we have 2-3 fields for contact details, we can’t just allow the user to provide any 1 of the available contact forms. So if we need any contact info, we can’t do that with this set up and force the user to provide at least an e-mail address, which may not be desired. It’s all a big mess.

    So, please disable sending e-mails for the invalid email syntax or make an option to disable these emails for people who just need a one simple field for any contact info. Let the developer use the form as he wishes in this regard please. Or just allow a text field for the Reply-To field but check in PHP if that’s a valid e-mail and if not, just skip it in the e-mail. Then everything will work fine.

Viewing 5 replies - 1 through 5 (of 5 total)
  • or make an option to disable these emails for people who just need a one simple field for any contact info. Let the developer use the form as he wishes in this regard please.

    Did you see following in the Configuration Validator FAQ:

    I understand the importance of validating configuration, but I have compelling reasons to avoid it. Is it possible to disable the configuration validator?

    You can disable the configuration validator by adding:
    
    define( 'WPCF7_VALIDATE_CONFIGURATION', false );
    to your wp-config.php, or adding:
    
    add_filter( 'wpcf7_validate_configuration', '__return_false' );
    to your theme’s functions.php.

    Thanks. That helps a bit, but requires all websites to make code changes and would turn off other, legit validations. I think the solution from my last sentence would be the best in this edge (but not rare) scenario.

    I’ve found Takayuki is open to detailed, well researched & tested code submissions that meet what he sees as the needs of the majority of CF7 users.

    For edge cases he will often consider providing a hook for developers to customize, as he has done in this case.

    This is quite common that there’s a need for 1 field for any type of contact info.

    Hello
    I think I have another case for this case.
    As described in a WP-Members blog article, I have two contact forms, one for logged in users, another for visitors.
    The one for users doesn’t ask for user name and e-mail. But I still need the e-mail, at least for the Reply-To field. So I tried to make a hidden field, as explained in the Contact Form tutorials (well made):
    [hidden user-email default:user_email]
    Except that Reply-To is marked as error, because it wants a email* (mandatory, and specifically e-mail) field.
    That could be solved by allowing a hidden attribute, like
    [email* user-email hidden default:user_email]
    but currently it doesn’t work, I see the field. Minor issue as it is pre-filled, but still not what I want, plus it allows for errors…
    I solved it with:
    [email* user-email hidden default:user_email class:hidden-field]
    with the hidden-field class having display: none, but it is a rather ugly hack… (I left the useless hidden attribute, as a kind of documentation…)

    This specific problem can be solved two ways:
    – accept the first syntax, when the default is user_email (thus the plugin is sure the e-mail is valid);
    – implement the Krzystof solution, which would make two happy persons (at least!). ??

    Perhaps something along the lines of allowing any field in the Reply-To field. Displaying a warning, as it is done currently. And allowing to check a “ignore this warning” checkbox beside the textarea… (equivalent to “I know what I am doing”…)

    This might need to do an e-mail check at time of sending the form, as said, with warning at the user that their e-mail is invalid.
    Mmm, this is a bit convoluted, admittedly. but we don’t want support of the site to receive contact mail without proper way to contact back the user, which will complaint to have no answer! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Invalid email syntax warnings need to be surpassable’ is closed to new replies.