Okay
  Public Ticket #1709746
Contact Form
Closed

Comments

  • rzamith started the conversation

    Hi guys,

    Any chance we can make the field "message" not mandatory? So that if someone inserts name and email only, the message will still be sent.

    Many thanks.

  • [deleted] replied

    Hi,

    Please add the following code in Theme Options > Footer > JavaScript > Footer JavaScript:

    <script>
        jQuery( document ).ready( function( $ ) {
            jQuery( '.contact-form textarea[name="message"]' ).addClass( 'not-required' );
        } );
    </script>
    
    This will remove message field from mandatory fields.

  • rzamith replied

    Hi Arlind,

    It doesn't seem to be working yet. The error doesn't show anymore for that particular field, but I think the field is still mandatory, because the message is not sent.

    You can try here: https://www.nicotravel.co.uk/

    Many thanks.

  • [deleted] replied

    Hi,

    I have tested on our site and you are right, it is now working properly so I made some changes on main JS file. Can you please replace it:

    Download this file (extract it) and replace it in this directory (of the theme): /assets/js

    Then hard refresh the page to load latest JS file version. I tried it and worked, see this video:

    https://d.pr/v/2eOXXn