• Resolved Rubbish

    (@iwdesignandprint)


    How do I disable the Message Box in the Contact Us section? I know how to delete the message box physically in the form section so it leaves Name and Email only, but the form will NOT SEND as it is still looking for Verification for the Message Box but I don’t know how to disable the verification?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @iwdesignandprint,

    Right now there is no option/setting to remove that verification.

    Here’s a dirty solution (that will not be overwritten everytime you update the plugin):
    1. copy maintenance.php from plugin’s folder /views/ sub-directory to /wp-content/wp-maintenance-mode.php
    2. edit /wp-content/wp-maintenance-mode.php and replace this:

    <p><textarea placeholder="<?php _e('Your message', $this->plugin_slug); ?>" data-rule-required="true" data-msg-required="<?php esc_attr_e('This field is required.', $this->plugin_slug); ?>" name="content" class="content_textarea"></textarea></p>

    with this:

    <p><textarea placeholder="<?php _e('Your message', $this->plugin_slug); ?>" data-rule-required="true" data-msg-required="<?php esc_attr_e('This field is required.', $this->plugin_slug); ?>" name="content" class="content_textarea" style="display:none;">-</textarea></p>

    This way the message textarea will be hidden.

    Thanks.

    Thread Starter Rubbish

    (@iwdesignandprint)

    Hi George,

    Many many thanks for your reply and yes it does hide the ‘message box’ but sadly the form will not ‘send’ and I get a pop up box saying “All fields required.” I presume the validator is still expecting the ‘message’ box (although hidden) to have content?

    In the WP Maintenance Mode Plugin folder assets / js there is a file titled “jquery.validate.js” but I have absolutely NO IDEA if this is the right file to amend or even how to amend it?

    Regards
    Martin

    You’re welcome. Are you sure you replaced the code as I said? Because the textarea is not empty (contains a hyphen)… So the client-side validation (also the server-side validation) should pass.

    I don’t recommend to edit any js file because it will be overwritten everytime the plugin is updated.

    Thread Starter Rubbish

    (@iwdesignandprint)

    Oh George you are the cats whiskers! Yes you hit the nail on the head I must have deleted the hyphen thinking it was there in error but as soon as I put it back it validates and sends!

    Thank you so much for your time.

    Regards
    Martin

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘DISABLE MESSAGE BOX’ is closed to new replies.