Announcement

Announcement Module
Collapse
No announcement yet.

How to Add New field to Contact Form

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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) {
    to
    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},
    To
    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;
    Important Links
    Live documentation
    Issue Log & Coming up
    Translation Status
    What's new in update ?
    Tips & Tricks section
    How to update WPLMS theme and plugins

    Support email for mailing your credentials:
    support@vibethemes.com
    P.S: Always mail the thread/topic link along with credentials for tracking.

    For faster support create a support request at support forums
Working...
X