Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • ibssoftware Friend
    #166867

    Hi All,

    i want to create a custom field in joomla 1.6 contact form.

    now there is
    Name*

    Email *

    Subject *

    Message *

    i want to add a telephone field

    please help

    chavan Friend
    #403771

    Take a Backup of the default_form.php and controller.php, then work on the below changes.

    Go to this File : componentscom_contactviewscontacttmpldefault_form.php
    Find this code


    <input type="text" name="subject" id="contact_subject" size="30" class="inputbox" value="" />
    <br /><br />

    and Add the following code Next line of that code.


    <label for="contact_telephone">
     <?php echo JText::_( 'Telephone' );?>:
    <br />
    <input type="text" name="telephone" id="contact_telephone" size="30" class="inputbox" value="" />
    <br /><br />

    ——————————————————————————————————————————————————————————————
    ——————————————————————————————————————————————————————————————
    Go to this File : componentscom_contactcontroller.php
    Find this code


    $subject = JRequest::getVar( 'subject', $default, 'post' );

    and Add the following code Next line of that code.


    $telephone = JRequest::getVar( 'telephone', '', 'post' );

    ——————————————————————————————————————————————————————————————
    ——————————————————————————————————————————————————————————————
    Go to this File : componentscom_contactcontroller.php
    Find this code

    $body = $prefix."n".$name.' <'.$email.'>'."rnrn".stripslashes($body);

    And replace it with the following


    $body = $prefix."n".$name.' <'.$email.'>'."rnrn".$telephone."rnrn".stripslashes($body);

    ——————————————————————————————————————————————————————————————
    ——————————————————————————————————————————————————————————————

    If you find the above difficult, try this extension http://extensions.joomla.org/extensions/contacts-and-feedback/contact-details/4811

    Note: If you Find my Post useful please click on the Thanks Icon

    ibssoftware Friend
    #403839

    Hi,
    Thx for the response. I think u give me Joomla 1.5 guide. But I am using JA Edenite Joomla 1.6 Template.

    Please help

    chavan Friend
    #403845

    you better try Qcontacts Extension http://extensions.joomla.org/extensions/contacts-and-feedback/contact-details/4811

    Meanwhile I will try with joomla 1.6 template.

    Note: If you Find my Post useful please click on the Thanks Icon

    ibssoftware Friend
    #403875

    Hi

    QContacts will not support Joomla 1.6

    chavan Friend
    #403878

    Will post you with the Right one soon for joomla 1.6.

    chavan Friend
    #403886

    Please post me your ftp details via PM. I will resolve it in minutes 🙂

    ibssoftware Friend
    #403894

    <em>@Chavan 256766 wrote:</em><blockquote>Please post me your ftp details via PM. I will resolve it in minutes :)</blockquote>

    Now i am testing in my loacl machine

    chavan Friend
    #403899

    ok then try this hope this would help you This is For Joomla 1.6

    Go to this File : componentscom_contactcontroller.php
    Find this code


    $body = $data['contact_message'];

    Add the below code to the Next line of it


    $contact_telephone = $data['contact_telephone'];

    ——————————————————————————————————————————————————————————————
    ——————————————————————————————————————————————————————————————

    Go to this File : componentscom_contactcontroller.php
    Find this code replace it


    $body = $prefix."n".$name.' <'.$email.'>'."rnrn".stripslashes($body);

    With


    $body = $prefix."n".$name.' <'.$email.'>'.."rnrn".$contact_telephone."rnrn".stripslashes($body);

    ——————————————————————————————————————————————————————————————
    ——————————————————————————————————————————————————————————————

    componentscom_contactviewscontacttmpldefault_form.php


    <dd><?php echo $this->form->getInput('contact_subject'); ?></dd>

    Add the below code to the Next line of it


    <dt><?php echo $this->form->getLabel('contact_telephone'); ?></dt>
    <dd><?php echo $this->form->getInput('contact_telephone'); ?></dd>

    Note: If you Find my Post useful please click on the Thanks Icon

    zao dao Friend
    #403904

    http://extensions.joomla.org/extensions/contacts-and-feedback/contact-forms/7901
    it’s a very good contact extension and support joomla1.7

    www.8media.com
    www.zaodao.com

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 10 replies, has 3 voices, and was last updated by  zao dao 12 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum