• Resolved bkatrin

    (@bkatrin)


    I have forms where the user can check or uncheck a checkbox, among other things. I would like to send a confirmation mail letting the user know what they submitted, along the lines of:

    Your name: [name]
    You selected xyz: [xyz-Checkbox]

    If the user checks the checkbox, the e-mail reads:

    Your name: Audrey
    You selected xyz: selected

    If the user does not check the checkbox, the e-mail reads:

    Your name: Audrey
    You selected xyz:

    This confuses a lot of users, as they think they mistakenly checked the checkbox (when they really didn’t). This is because the [xyz-Checkbox] tag resolves to an empty string in this case.

    –> How can I make the confirmation e-mail read

    Your name: Audrey
    You selected xyz: not selected

    if the user leaves the xyz checkbox unchecked?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, do you have the following option enabled Enable to skip names of non-required and unfilled-out fields in emails. under the Advanced tab? If you don’t make sure you enable this feature. Then your problem should be solved.

    Let me know if this helps you.

    Regards

    • This reply was modified 7 years, 10 months ago by mbrsolution.
    Thread Starter bkatrin

    (@bkatrin)

    Thanks for the quick reply! Unfortunately, I don’t quite understand how this is supposed to solve my problem – I don’t want to skip an unfilled-out field. I want to tell the user that they didn’t fill it out (something like the opposite of skipping, if that makes sense), cf. my example above.

    I just tested the setting with the example I posted above, and didn’t see a difference in the mail that was sent out. What am I doing wrong?

    Is there a documentation of this feature? I can’t seem to find it, and the help text essentially just repeats the name of the feature ??

    Sorry there isn’t a setting for that.
    The plugin already has what some people say are too many settings.
    I can direct you towards the lines of code in the program if you want to somewhat hack the code to do what you want

    this folder
    /wp-content/plugins/si-contact-form/includes/

    this file
    class-fscf-process.php

    there is a block on code after
    case ‘checkbox’

    where you could find this
    if ( '1' == self::$form_data[$field['slug']] ) {
    add an else statement

    and put this
    self::$email_fields[$field['slug']] = __('not selected', 'si-contact-form');

    Thread Starter bkatrin

    (@bkatrin)

    Hi Mike

    Thank you for your detailed answer! I’ll implement it like that.

    And I think your plugin has just the right amount of settings – thanks so much for writing & maintaining it, it makes my life easier every day!

    (@bkatrin) were you able to implement what Mike Challis suggested above? If you did would you like to share your solution for others?

    If your issue is resolved can you mark this support thread as resolved.

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Confirmation E-mail: Display Unselected Checkbox’ is closed to new replies.