Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • adplus Friend
    #934995

    The e-mail field in comment form is set as required. How can I change e-mail field not required? I check all configuration options but not found desired option.

    Luna Garden Moderator
    #935917

    Hi,

    In order to leave email out of required field, go to file:

    components\com_jacomment\asset\js\ja.comment.js

    Find and remove:

    if($('#guestEmail').val() == "" || ($('#guestEmail').val() == $('#jac_hid_text_email').val() && $("#guestEmail").attr('class').indexOf("jac-inner-text"))){
                    changeClassName("guestEmail","ja-error", "ja-error");
                    $("#err_guestEmail").css('display', 'block');
                    $("#err_guestEmail").html(JACommentConfig.hidInputEmail);
                    if(checkError == 0)
                        $('#guestEmail').focus();
                    checkError = 1;
                }else{
                    //changeClassName("guestEmail","ja-error", "");
                    $("#err_guestEmail").html('');
                    var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
                    if (!filter.test($('#guestEmail').val())) {
                        changeClassName("guestEmail","ja-error", "ja-error");
                        $("#err_guestEmail").css('display', 'block');
                        $("#err_guestEmail").html(JACommentConfig.hidValidEmail);
                        if(checkError == 0)
                            $('#guestEmail').focus();
                        checkError = 1;
                    }else{
                        changeClassName("guestEmail","ja-error", "");
                        $("#err_guestEmail").html('');
                        $("#err_guestEmail").css('display', 'none');
                    }
                }

    adplus Friend
    #936024

    Thank for your answer,

    After removing above mentioned code I got this in web browser inspect code console: "http://lennuk.eu/arendus/rahvauudis/component/jacomment/?option=com_jacomme…mment&tmpl=component&contentoption=com_content&contentid=351&commenttype=1 **Failed to load resource: the server responded with a status of 500 (Invalid address: Enter Email)** and submiting comment isn’t finished.

    Luna Garden Moderator
    #936267

    Hi,

    Use this file I have attached here, unzip and overwrite to:

    components\com_jacomment\asset\js\ja.comment.js

    If it still doesn’t work, send me your site URL, admin account & FTP account, I’ll remove it for you.


    1. ja.comment.zip

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Luna Garden 7 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum