1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Wordpress contact form ..

Discussion in 'WordPress' started by t3cho, Mar 9, 2014.

  1. #1
    Hello guys ..

    Im working on my page and i have a problem .. I created a form with this code .

    <form action="kontaktirajte.php" class="box style">
    <fieldset>
            <legend>Formular za kontakt</legend>
            <div><label for="k1">Ime:</label><br> <input type="text" value="" name="ime" id="k1"></div>
            <div><label for="k2">Email:</label> <br><input type="mail" value="" name="mailadresa" id="k2"></div>     
                    <div><textarea rows="7" cols="35" id="k3" name="poruka"></textarea><br>
        <input type="submit" value="OK" name="bkontakt" />
         
    </fieldset>
    HTML:
    After that i created a file called kontaktirajte.php with this code
    <?php
    if (isset($_POST['poruka']) ) {
    $ime = $_POST['ime'];
    $adresa = $_POST['email'];
    $poruka = $_POST['poruka'];
    $mail = 'anel_001@hotmail.com';
    
        if(filter_var($adresa, FILTER_VALIDATE_EMAIL)) {
            $prima = "anel.hodzic@yahoo.com";
            $subjekt = 'Info - Kontaktiranje';
            $textporuke = 'Korisnik sa imenom $ime vam salje sljedecu poruku... $poruka stshop.info';
            $headers = 'From: Nova primjedba na stshop.info';
            mail($prima,$subjekt,$textporuke,$headers);
        } else {
            echo "Email nije validan";
        }
    }
    
    ?>
    PHP:
    All that together looks like this http://stshop.info/kontakt/

    And now when i want to upload my kontaktirajte.php file on ftp , where i need to upload it ??

    I created the form on page kontakti..

    Have a nice day and thanks.
     
    Last edited: Mar 9, 2014
    t3cho, Mar 9, 2014 IP
  2. kalseo

    kalseo Active Member

    Messages:
    733
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Why just not use plugin for this job? ContactForm 7 can do this with few clicks.

    Using custom forms based on code is not advisable, it is possible to add plug-in and parse PHP code, but this will open thousands of security holes.

     
    kalseo, Mar 9, 2014 IP
  3. t3cho

    t3cho Active Member

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    65
    #3
    Ok i will listen your advice.

    But is there any way to set form created with ContactForm 7 to looks like this one mine ?
    Example this is the code which i get by creating form with ContactForm7

    <p>Your Name (required)<br />
        [text* your-name] </p>
    
    <p>Your Email (required)<br />
        [email* your-email] </p>
    
    <p>Subject<br />
        [text your-subject] </p>
    
    <p>Your Message<br />
        [textarea your-message] </p>
    
    <p>[submit "Send"]</p>
    HTML:
    Picture: [​IMG]

    So i want that form above looks like

    
    <form action="kontaktirajte.php" class="box style">
    <fieldset>
            <legend>Formular za kontakt</legend>
            <div><label for="k1">Ime:</label><br> <input type="text" value="" name="ime" id="k1"></div>
            <div><label for="k2">Email:</label> <br><input type="mail" value="" name="mailadresa" id="k2"></div>       
                    <div><textarea rows="7" cols="35" id="k3" name="poruka"></textarea><br>
        <input type="submit" value="OK" name="bkontakt" />
           
    </fieldset>
    HTML:
    Picture : [​IMG]

    SO i want to edit above html file and this is the editor whch i get

    [​IMG]
     
    t3cho, Mar 10, 2014 IP
  4. yize

    yize Active Member

    Messages:
    107
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #4
    contact form7 uses the css in your theme for the colours, etc. so edit your css page for the form.
     
    yize, Mar 10, 2014 IP
  5. t3cho

    t3cho Active Member

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    65
    #5
    Thanks for your answer I think i know how to edit CSS file and that is all im not so familiar with wp ..

    So i edit the file /stshop.info/htdocs/wp-content/themes/yoo_drive_wp/css/? or something else :(
     
    t3cho, Mar 10, 2014 IP
  6. kalseo

    kalseo Active Member

    Messages:
    733
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #6
    Get Firebug extension or use Chrome Web Development tools to find which CSS file you need to edit.
     
    kalseo, Mar 10, 2014 IP
  7. t3cho

    t3cho Active Member

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    65
    #7
    Hmh i managed to enter the css i need to edit :) .. Just one more thing . Does anyone know how to make form like this in css, or give me some directions how to make it

    [​IMG]
     
    t3cho, Mar 10, 2014 IP
  8. kalseo

    kalseo Active Member

    Messages:
    733
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #8
    "Generate Tags", section will help you to make anything you want. I highly suggest you check ContactForm7 documentation
     
    kalseo, Mar 10, 2014 IP
  9. ShipRaider

    ShipRaider Member

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #9
    I actually recommend Filezilla over a browser plugin for FTP.
     
    ShipRaider, Mar 10, 2014 IP
  10. t3cho

    t3cho Active Member

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    65
    #10
    Hmh i think i will just quit .. This is the video i used to learn something about this forms but when i navigate to editor i cant find the .css file :(

     
    t3cho, Mar 10, 2014 IP
  11. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    405
    Best Answers:
    21
    Trophy Points:
    295
    #11
    Nigel Lew, Mar 10, 2014 IP
  12. salmanshafiq

    salmanshafiq Well-Known Member

    Messages:
    260
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #12
    you can put your custom css classes to the fileds as you contact form 7 allow us to do that so I don't think so you need to do any extra work for this...
     
    salmanshafiq, Mar 12, 2014 IP
  13. ShipRaider

    ShipRaider Member

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #13
    The CSS for the contact form plugin should be in that plugin folder.
     
    ShipRaider, Mar 15, 2014 IP
  14. kiranreddy

    kiranreddy Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #14
    Instead of this why don't you use contact form 7 plugin
     
    kiranreddy, Mar 17, 2014 IP
  15. Traverse City Web Design

    Traverse City Web Design Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #15
    Don't make a custom css folder, or edit any of the css in the template files. Instead, download a plugin that creates a Custom CSS field. You can write your CSS there and overwrite the existing CSS. Use Firebug to see the CSS rules you are overwriting.