- Once the contact form is submitted I receive multiple copies of the same e-mail. Why?
- How can I display a confirmation message when the contact form is submitted?
- QContacts doesn't display the captcha code. Why?
- How can I add more custom fields to the contact form?
Once the contact form is submitted I receive multiple copies of the same e-mail. Why?
This is an issue frequently reported by users hosted on Windows servers. We cannot test QContacts in this environment and we are not able to reproduce and verify this issue. The same problem apparently also affects the standard com_contact component.
However here is a fix that worked for all users who have contacted us about this issue
Line 63 in file: /components/com_qcontacts/controller.php (frontend)
$link = JRoute::_('index.php?option=com_qcontacts&view=contact&id='.$contact->slug.'&catid='.$contact->catslug, false);
Change only this line as
$link = 'index.php?option=com_qcontacts&view=contact&id='.$contact->slug.'&catid='.$contact->catslug;
Lines may wrap on the screen. Copy and paste in the source as a single line.
How can I display a confirmation message when the contact form is submitted?
A 'Thank you' message is already displayed by QContacts when the contact form is successfully submitted. If you don't see it check the index.php file of your template (not the index.php in the main Joomla! folder).
If the following tag is missing
<jdoc:include type="message" />
you need to add it to your template. If you are not familiar with Joomla templates you can check where this tag is placed in standard templates distributed with Joomla! (beez, rhuk_milkyway).
This is not a special requirement of QContacts: this tag is needed to display all messages returned by components.
To change the text of the message you need to edit the language file. For English language find this line in language/en-GB/en-GB.com_qcontacts.ini
THANK YOU FOR YOUR E-MAIL=Thank you for your e-mail
Change the part to the right of the equal sign as you like. Obviously the file is different for different languages. For example
Spanish: language/es-ES/es-ES.com_qcontacts.ini
French: language/fr-FR/fr-FR.com_qcontacts.ini
QContacts doesn't display the captcha code. Why?
Provided you have set the captcha to show, show captcha = Yes in global or contact configuration parameters, if you still don't see it on your contact page the problem may be one of the following
1) GD library not installed or not properly configured on your server. You can verify this by yourself. Login to Joomla backend and go to Help -> System info -> PHP Information.
A GD section must be present with these entries
- GD Support enabled
- GD Version (version number may vary, it must be 2 or higher )
- FreeType Support enabled
- FreeType Linkage with freetype
2) If you use SH404Sef to rewrite QContacts urls you must download QContacts SH404Sef plugin and follow the instructions in readme.txt file inside the package to install it. Without the plugin the captcha url may be rewritten in a way that prevents our component from generating the verification image.
3) Some users report that captcha is not shown simply because they don't realize they are still seeing the old contact page generated by the standard Joomla contact component (com_contact). Once you have installed QContacts and imported contacts from com_contact you need to create a new menu link for QContacts.
- Login to Joomla backend
- go to Menus -> Menu Manager
- click Menu Item(s) of the menu where you want to add the contact us link
- click New on the toolbar
- on the next page in Select Menu Item Type list select QContacts (NOT Contacts)
- select the link type (Standard Contact Layout or Contact Category Layout)
- configure your link and save
How can I add more custom fields to the contact form?
If you need more than 6 custom fields you can add them manually to the configuration files. Make a copy of every file you modify so that you can reverse any modification in case you make a mistake.
Here is how to add Custom Field 7.
Locate this part in file .../administrator/components/com_qcontacts/contact_items.xml (around line 326)
<param name="cust6_ord" type="text" size="2" default="" label="Cust. Field 6 Order" description="Custom field 6 order" />
Immediately after that line add the following lines
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="cust7_show" type="list" default="" label="Cust. Field 7" description="">
<option value="">Use Global</option>
<option value="0">Hide</option>
<option value="1">Show(Optional)</option>
<option value="2">Show(Required)</option>
</param>
<param name="cust7_label" type="text" default="" label="Cust. Field 7 Label" description="Custom field 7 label" />
<param name="cust7_type" type="list" default="" label="Cust. Field 7 Type" description="Custom field 7 type">
<option value="">Use Global</option>
<option value="0">Text</option>
<option value="1">Textarea</option>
<option value="2">Radio</option>
<option value="3">Checkbox</option>
<option value="4">Drop Down</option>
</param>
<param name="cust7_size" type="text" size="6" default="" label="Cust. Field 7 Size" description="Custom field 7 size" />
<param name="cust7_value" type="text" size="25" default="" label="Cust. Field 7 Value" description="Custom field 7 value" />
<param name="cust7_ord" type="text" size="2" default="" label="Cust. Field 7 Order" description="Custom field 7 order" />
Locate this part in file .../administrator/components/com_qcontacts/qcontacts_cfg.xml (around line 283)
<param name="cust6_ord" type="text" size="2" default="9" label="Cust. Field 6 Order" description="Custom field 6 order" />
Immediately after that line add the following lines
<param name="@spacer" type="spacer" default="" label="" description="" />
<param name="cust7_show" type="list" default="0" label="Cust. Field 7" description="">
<option value="0">Hide</option>
<option value="1">Show(Optional)</option>
<option value="2">Show(Required)</option>
</param>
<param name="cust7_label" type="text" default="" label="Cust. Field 7 Label" description="Custom field 7 label" />
<param name="cust7_type" type="list" default="0" label="Cust. Field 7 Type" description="Custom field 7 type">
<option value="0">Text</option>
<option value="1">Textarea</option>
<option value="2">Radio</option>
<option value="3">Checkbox</option>
<option value="4">Drop Down</option>
</param>
<param name="cust7_size" type="text" size="6" default="" label="Cust. Field 7 Size" description="Custom field 7 size" />
<param name="cust7_value" type="text" size="25" default="" label="Cust. Field 7 Value" description="Custom field 7 value" />
<param name="cust7_ord" type="text" size="2" default="9" label="Cust. Field 7 Order" description="Custom field 7 order" />
Finally change line 32 in file .../components/com_qcontacts/models/contact.php as
var $max_cust_fields = 7;
If you need to add more custom fields you can repeat the three steps explained above. When you add the 8th field all numbers outlined in bold in the above code will be 8 and so on.
| < Prev | Next > |
|---|






