简体   繁体   中英

Joomla - Contact Form - Miscellaneous info above form

I want to add a new contact form with some extra information.

  • The first screenshot shows that I can add: 'miscellaneous info'
  • The second screenshot shows the result: This info is at the bottom of the contact form.

Can this 'miscellaneous info' be put at the top of a contact form?

新增联络人

此联系人的介绍

to do that first of all you need to create a template override of contact form.

To do so:

  1. Open your template folder and create html folder if it doesn't exist
  2. In html folder create folder com_contact if it doesn't exist
  3. In com_contact folder create folder contact
  4. Copy /components/com_contact/views/contact/tmpl/default.php file to /templates/YOUR_TEMPLATE/html/com_contact/contact/default.php
  5. Open your newly copied default.php file find the following line anywhere you want (after or before another elements):

    echo $this->contact->misc;

Note, in some templates you might already have /templates/YOUR_TEMPLATE/html/com_contact/contact/default.php file. Then you just need to customize it for your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM