-
AuthorPosts
-
July 30, 2011 at 5:14 am #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 Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
July 31, 2011 at 6:30 am #403771Take 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
1 user says Thank You to chavan for this useful post
August 1, 2011 at 2:03 am #403839Hi,
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 Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
August 1, 2011 at 2:35 am #403845you 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
1 user says Thank You to chavan for this useful post
August 1, 2011 at 5:36 am #403875Hi
QContacts will not support Joomla 1.6
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
August 1, 2011 at 5:50 am #403878Will post you with the Right one soon for joomla 1.6.
1 user says Thank You to chavan for this useful post
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
August 1, 2011 at 7:04 am #403886Please post me your ftp details via PM. I will resolve it in minutes 🙂
August 1, 2011 at 7:17 am #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 Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
August 1, 2011 at 7:24 am #403899ok 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 Friendzao dao
- Join date:
- September 2014
- Posts:
- 155
- Downloads:
- 160
- Uploads:
- 2
- Thanks:
- 12
- Thanked:
- 11 times in 1 posts
August 1, 2011 at 7:39 am #403904http://extensions.joomla.org/extensions/contacts-and-feedback/contact-forms/7901
it’s a very good contact extension and support joomla1.7www.8media.com
www.zaodao.com -
AuthorPosts
This topic contains 10 replies, has 3 voices, and was last updated by zao dao 13 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum