Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi,
first time I've got issues with my contact form. This is my code
Code: Select all
 <cms:if k_success>
                    <p class="success" id="mail_success" style="display:block;">Wiadomość została wysłana, skontaktujemy się z Tobą wkrótce.</p>

                    <cms:send_mail from=k_email_from to=k_email_to subject="Wiadomość kontaktowa">
                        Wiadomość wysłana przez formularz kontaktowy:
                        <cms:show k_success />
                    </cms:send_mail>
                </cms:if>
<cms:form action="" method="post" id="contact_form">
                        <div class="input-wrapper">
                            <div class="input-block" style="background-color: #ff6b00;"></div>
                            <cms:input type="text" name="name" placeholder="Imię i Nazwisko" required='1'/>
                            <cms:if k_error_name>
                                <p id="name_error" class="error" style="display:block;">Podaj imię</p>
                            </cms:if>
                        </div>
                        <div class="input-wrapper">
                            <div class="input-block" style="background-color: #4a9bd7;"></div>
                            <cms:input type="text" name="email" id="email" placeholder="Adres email" required='1' validator='email'/>
                            <cms:if k_error_email>
                                <p id="email_error" class="error" style="display:block;">Podaj poprawny adres email</p>
                            </cms:if>

                        </div>
                        <div class="input-wrapper">
                            <div class="input-block" style="background-color: transparent;"></div>
                            <cms:input type="text" id="phone" name="phone" placeholder="Numer telefonu" required='1'/>
                           
                            <div class="input-block" style="background-color: #3ca830;">
                            </div>
                            <cms:if k_error_phone>
                                <p id="phone_error" class="error" style="display:block;">Podaj numer telefonu</p>
                            </cms:if>
                        </div>
                        <div class="input-wrapper">
                            <div class="input-block" style="background-color: transparent;"></div>
                            <cms:input type="textarea" name="msg" id="msg" cols="30" rows="10" placeholder="Wiadomość" required='1'></cms:input>
                            <div class="input-block" style="background-color: #fcc71d;">
                            </div>
                            <cms:if k_error_msg>
                                <p id="msg_error" class="error" style="display:block;">Treść nie może być pusta</p>
                            </cms:if>
                           
                        </div>
                        <div class="input-wrapper" style="margin-left:34px">
                            <cms:input name='recaptcha_test' type='recaptcha' class="recaptcha"/>
                        </div>
                        <!-- <div class="form-check">
                            <div class="input-block" style="background-color: transparent;"></div>
                            <input type="checkbox" name="legal" class="form-check-input" id="exampleCheck1">
                            <label class="form-check-label" for="exampleCheck1">Wyrażam zgodę na przetważanie moich danych osobowych <br> przez BCSG zgodnie z Polityką Prywatności</label>
                        </div> -->
                        <div class="input-wrapper" id="button">
                            <div class="input-block" style="background-color: #3ca830;"></div>
                            <input type="submit" value="Wyślij" class='input-send' id="send_message">
                        </div>

                    </cms:form>

Config.php file is configured with my gmail addresses.
After clicking submit url hash is changing to #kformname0 and nothing is happening.

What is wrong here?
Site URL: Inlogica.com

Hi,

The 'success' block (and hence the code sending email) is supposed to be within the <cms:form> block e.g. as follows -
Code: Select all
<cms:form action="" method="post" id="contact_form">
    <cms:if k_success>
        <p class="success" id="mail_success" style="display:block;">Wiadomość została wysłana, skontaktujemy się z Tobą wkrótce.</p>

        <cms:send_mail from=k_email_from to=k_email_to subject="Wiadomość kontaktowa">
            Wiadomość wysłana przez formularz kontaktowy:
            <cms:show k_success />
        </cms:send_mail>
    </cms:if>
   
    <div class="input-wrapper">
        <div class="input-block" style="background-color: #ff6b00;"></div>
        <cms:input type="text" name="name" placeholder="Imię i Nazwisko" required='1'/>
        <cms:if k_error_name>
            <p id="name_error" class="error" style="display:block;">Podaj imię</p>
        </cms:if>
    </div>
    ..
   
    ..

</cms:form>

Please amend your code accordingly.

Hope this helps.
2 posts Page 1 of 1