Quform not working with own form

Home Forums Quform PHP Quform not working with own form

This topic is: resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26931
    shaboomstik
    Participant

    Hi,

    I have scoured the forum for a solution to my problem to no avail. When I submit the form the page jumps to the top of the page and I don’t receive an email. Also when you scroll back down to the form all the data is still in the fields. I did verify that php mail is working. I just can’t seem to figure this out. Please assist if possible.

    My code:

    <section id="contact-h" class="bg-parallax contact-h-bg">
        <div class="container">
            <div class="row">
                <div class="col-md-6">
                    <div class="contact-h-cont quform-elements">
                        <h3 class="cl-white">Contact us</h3>
                        <br>
                        <form class="quform" action="quform/process.php">
                            <div class="form-group cl-white quform-input">
                                <label for="name">Your Name<span class="quform-required">*</span></label>
                                <input name="name" type="text" class="form-control" id="name"
                                    placeholder="Enter name">
                            </div>
                            <div class="form-group cl-white quform-input">
                                <label for="email">Email Address<span class="quform-required">*</span></label>
                                <input name="email" type="email" class="form-control" id="email"
                                    placeholder="Enter email">
                            </div>
                            <div class="form-group cl-white quform-input">
                                <label for="subject">Subject<span class="quform-required">*</span></label>
                                <input name="sub" type="text" class="form-control" id="subject"
                                    placeholder="Enter subject">
                            </div>
                            <div class="form-group cl-white quform-input">
                                <label for="message">Message<span class="quform-required">*</span></label>
                                <textarea name="message" class="form-control" id="message" rows="3"></textarea>
                            </div>
                            <button name="submit" type="submit" class="btn btn-general btn-white quform-submit">submit</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>

    process.php:

    /** FORM ELEMENT CONFIGURATION **/
    
    /**
     * Configure the first name element
     * Filters: Trim
     * Validators: Required.
     */
    $name = new Quform_Element('name', 'Your Name');
    $name->addFilter('trim');
    $name->addValidator('required');
    $form->addElement($name);
    
    /**
     * Configure the email address element
     * Filters: Trim
     * Validators: Required, Email.
     */
    $email = new Quform_Element('email', 'Email Address');
    $email->addFilter('trim');
    $email->addValidators(array('required', 'email'));
    $form->addElement($email);
    
    /**
     * Configure the subject element
     * Filters: Trim
     * Validators: Required.
     */
    $subject = new Quform_Element('subject', 'Subject');
    $subject->addFilter('trim');
    $subject->addValidator('required');
    $form->addElement($subject);
    
    /**
     * Configure the message element
     * Filters: Trim
     * Validators: Required.
     */
    $message = new Quform_Element('message', 'Message');
    $message->addFilter('trim');
    $message->addValidator('required');
    $form->addElement($message);
    
    /** END FORM ELEMENT CONFIGURATION **/
    #26943
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #26955
    shaboomstik
    Participant

    Thank you for the assistance. I was blind to those issues, always helps to have a second set of eyes. Again thank you so much.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy