For WPLMS support

Please create ticket at for WPLMS theme support.
See more
See less

How to Add New field to Contact Form

  • Filter
  • Time
  • Show
Clear All
new posts

  • Support How to Add New field to Contact Form

    Follow these steps:
    1. Open file custom.js
    2. Search for the on click function i.e line $(".sendmail").click(function () {
    3. You'll see that I am capturing email and the content of the form using these two lines:
    var data = mail;
    var content=$('#contact_text').val();
    To add phone no. also (assuming that you've added the field in html form , add this line below above lines:
    var phone = $('#phone').val();
    now send this phone variable to the send function

    i.e change this line setTimeout(function(){send(data,content);}, 2000); to
    setTimeout(function(){send(data,phone,content);}, 2000);
    4. Now, you need to change the send function, change this line
    function send(datastr,content) {
    function send(datastr,phone,content) {
    5. Now send this phone variable to your php file where it gets captures as phone ($_POST['phone']), change this line
    data: {email:datastr, content: content},
    data: {email:datastr, phone: phone, content: content},

    Then in mail.php capture the post items in variables
    $phone_id= $_POST['phone'] & edit the message content:
    $message = $content."/n/n FROM:".$email_id."/n/n Phone: ".$phone_id;

    Support will be migrated to
    permanently from 15th March'15.
    We recommend users to start posting support tickets in the above link.