How to add contacts in Joomla fields

Joomla is a flexible content management system. Its basic installation includes a number of useful plugins, which add functionality to web pages with minimal work expenditure. The basic contact plug-in included with Joomla contains fields for email addresses, telephone numbers and addresses. If the predefined fields do not cover your needs, is the easiest method to add more, install a different contact plug-in. If you change interest in programming, however, you can set the default contact module.


how to Add fields to contacts in Joomla
Joomla is a flexible content management system. Its basic installation includes a number of useful plugins, which add functionality to web pages with minimal work expenditure. The basic contact plug-in included with Joomla contains fields for email addresses, telephone numbers and addresses. If the predefined fields do not cover your needs, is the easiest method to add more, install a different contact plug-in. If you change interest in programming, however, you can set the default contact module.
things you Need
  • Administrative access to the Joomla installation
  • Code or text editor

  • MySQL

  • Use to open a code or text editor contact.php file in the host\administrator\components\com_contact\tables directory. The name of the host directory depends on the location of the Joomla files on your server installation. Paste the code "var $newfield = null" (without the quotation marks) in the section of the code with the "@var string" - entries. Save and close the file. This code-snippet, you add a new field named "newfield" in the list of variables, searching the contact program.
  • Open the "admin.contact.html.php" file in the host\Administrator\components\com_contact directory. Locate the following section of code:








    replace it with:
















    Save and close the file. This code shows the new label, and you accept the date in the new entry field on your site.
  • Open the MySQL-database-administration interface, and add a column with the name of the new field to the database table: "jos_newfield_details". A new column must be added to allow the database to make the information be stored and retrieved by the application.
  • Create a folder in your current template folder with the name
    "\html\com_contact\contact" and you will have to copy the defaut_address.php file from "\components\com_contact\views\contact\tmpl" folder in the new folder under the current template.
  • Open the file you just copied and add:
    escape($this->contact->newfield) ?>
    immediately after the line:
    defined( '_JEXEC' ) or die( 'Restricted access' )
    ?>
    Save and close the file.
  • Open the Joomla Administrator user interface. Add the new fields to the published contact form.

tips & warnings
  • you can have all the coding changes to the Web host via the command line or in cPanel file management interface with the text-or code-editing program of your choice You can database database column, the insert with your choice of MySQL tools.
  • Replace each instance of "NewField" in the code with the name of the field that you want to appear on your contact information.
  • It is best to change and test code for your website on your local host Computer first.

  • you back up your files before you change on your Web server.
  • These changes are not likely to survive the upgrade process when upgrading Joomla versions.








How to add contacts in Joomla fields


Joomla is a flexible content management system. Its basic installation includes a number of useful plugins, which add functionality to web pages with minimal work expenditure. The basic contact plug-in included with Joomla contains fields for email addresses, telephone numbers and addresses. If the predefined fields do not cover your needs, is the easiest method to add more, install a different contact plug-in. If you change interest in programming, however, you can set the default contact module.


how to Add fields to contacts in Joomla
Joomla is a flexible content management system. Its basic installation includes a number of useful plugins, which add functionality to web pages with minimal work expenditure. The basic contact plug-in included with Joomla contains fields for email addresses, telephone numbers and addresses. If the predefined fields do not cover your needs, is the easiest method to add more, install a different contact plug-in. If you change interest in programming, however, you can set the default contact module.
things you Need
  • Administrative access to the Joomla installation
  • Code or text editor

  • MySQL

  • Use to open a code or text editor contact.php file in the host\administrator\components\com_contact\tables directory. The name of the host directory depends on the location of the Joomla files on your server installation. Paste the code "var $newfield = null" (without the quotation marks) in the section of the code with the "@var string" - entries. Save and close the file. This code-snippet, you add a new field named "newfield" in the list of variables, searching the contact program.
  • Open the "admin.contact.html.php" file in the host\Administrator\components\com_contact directory. Locate the following section of code:








    replace it with:
















    Save and close the file. This code shows the new label, and you accept the date in the new entry field on your site.
  • Open the MySQL-database-administration interface, and add a column with the name of the new field to the database table: "jos_newfield_details". A new column must be added to allow the database to make the information be stored and retrieved by the application.
  • Create a folder in your current template folder with the name
    "\html\com_contact\contact" and you will have to copy the defaut_address.php file from "\components\com_contact\views\contact\tmpl" folder in the new folder under the current template.
  • Open the file you just copied and add:
    escape($this->contact->newfield) ?>
    immediately after the line:
    defined( '_JEXEC' ) or die( 'Restricted access' )
    ?>
    Save and close the file.
  • Open the Joomla Administrator user interface. Add the new fields to the published contact form.

tips & warnings
  • you can have all the coding changes to the Web host via the command line or in cPanel file management interface with the text-or code-editing program of your choice You can database database column, the insert with your choice of MySQL tools.
  • Replace each instance of "NewField" in the code with the name of the field that you want to appear on your contact information.
  • It is best to change and test code for your website on your local host Computer first.

  • you back up your files before you change on your Web server.
  • These changes are not likely to survive the upgrade process when upgrading Joomla versions.

How to add contacts in Joomla fields

Joomla is a flexible content management system. Its basic installation includes a number of useful plugins, which add functionality to web pages with minimal work expenditure. The basic contact plug-in included with Joomla contains fields for email addresses, telephone numbers and addresses. If the predefined fields do not cover your needs, is the easiest method to add more, install a different contact plug-in. If you change interest in programming, however, you can set the default contact module.
How to add contacts in Joomla fields
How to add contacts in Joomla fields
Recommend to friends
  • gplus
  • pinterest

Recent posts

Comment

Leave comment

Rating