Hi,
I am using jsn_epi_free edition with Joomla 1.6.3
I have noticed that the contact form is not working as well.
Only email is set as mandatory. When I post the form I've got message saying that name, email and subject are mandatory... but I fill them ! And of course no mail is send.
I have look at the code and I have noticed a lot of differences (form name and input name) compared with the original template code.
I poste here the code that I have modified of the file default_form present in the directory: /templates/jsn_epic_free/html/com_contact/contact
I changed the code. Is it good ? Have I missed a contact form configuration with this template ? I have notice that the code is the same as the blank_j15 template. Maybe it is a joomla version issue (v1.5 VS v1.6) ?Code:<?php /** * @version /** $Id: default_form.php 11845 2009-05-27 23:28:59Z robs * @package Joomla.Site * @subpackage Contact * @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('behavior.keepalive'); $script = ' function validateForm(frm) { var valid = document.formvalidator.isValid(frm); if (valid == false) { // do field validation if (frm.email.invalid) { alert("' . JText::_('COM_CONTACT_CONTACT_ENTER_VALID_EMAIL', true) . '"); } else if (frm.text.invalid) { alert("' . JText::_('COM_CONTACT_FORM_NC', true) . '"); } return false; } else { frm.submit(); } }'; $document = JFactory::getDocument(); $document->addScriptDeclaration($script); ?> <?php if (isset($this->error)) : ?> <div class="contact-error"> <?php echo $this->error; ?> </div> <?php endif; ?> <div class="contact-form"> <form id="contact-form" action="<?php echo JRoute::_('index.php'); ?>" method="post" class="form-validate"> <p class="form-required"> <?php echo JText::_('COM_CONTACT_CONTACT_REQUIRED');?> </p> <div class="jsn-mailling-form"> <p class="contact-name"> <?php echo $this->form->getLabel('contact_name'); ?> <br> <?php echo $this->form->getInput('contact_name'); ?> </p> <p class="contact-email"> <?php echo $this->form->getLabel('contact_email'); ?> <br> <?php echo $this->form->getInput('contact_email'); ?> </p> <p class="contact_subject"> <?php echo $this->form->getLabel('contact_subject'); ?> <br> <?php echo $this->form->getInput('contact_subject'); ?> </p> <p class="contact_subject"> <?php echo $this->form->getLabel('contact_message'); ?> <br> <?php echo $this->form->getInput('contact_message'); ?> </p> <?php if ($this->params->get('show_email_copy')){ ?> <p class="contact-mail-copy"> <?php echo $this->form->getInput('contact_email_copy'); ?> <?php echo $this->form->getLabel('contact_email_copy'); ?> </p> <?php } ?> <button class="button validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button> <input type="hidden" name="option" value="com_contact" /> <input type="hidden" name="task" value="contact.submit" /> <input type="hidden" name="return" value="<?php echo $this->return_page;?>" /> <?php echo JHtml::_( 'form.token' ); ?> </div> </form> </div> <!-- --Code original qui ne fonctionne pas <div class="contact-form"> <form action="<?php echo JRoute::_('index.php');?>" method="post" name="emailForm" id="emailForm" class="form-validate"> <p class="form-required"> <?php echo JText::_('COM_CONTACT_CONTACT_REQUIRED');?> </p> <div class="jsn-mailling-form"> <p class="contact-name"> <label for="contact-formname"> <?php echo JText::_('COM_CONTACT_CONTACT_EMAIL_NAME');?> </label> <input type="text" name="name" id="contact-formname" size="30" class="inputbox" value="" /> </p> <p class="contact-mail"> <label id="contact-emailmsg" for="contact-email"> <?php echo JText::_('JGLOBAL_EMAIL');?>* </label> <input type="text" id="contact-email" name="email" size="30" value="" class="inputbox required validate-email" maxlength="100" /> </p> <p class="contact-subject"> <label for="contact-subject"> <?php echo JText::_('COM_CONTACT_CONTACT_MESSAGE_SUBJECT');?>: </label> <input type="text" name="subject" id="contact-subject" size="30" class="inputbox" value="" /> </p> <p class="contact-message"> <label id="contact-textmsg" for="contact-text"> <?php echo JText::_('COM_CONTACT_CONTACT_ENTER_MESSAGE');?>: </label> <textarea cols="50" rows="10" name="text" id="contact-text" class="inputbox required"></textarea> </p> <?php if ($this->params->get('show_email_copy')) : ?> <p class="contact-mail-copy"> <input type="checkbox" name="email_copy" id="contact-email-copy" value="1" /> <label for="contact-email-copy"> <?php echo JText::_('COM_CONTACT_CONTACT_EMAIL_A_COPY'); ?> </label> </p> <?php endif; ?> <div> <button class="button validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button> </div> <input type="hidden" name="option" value="com_contact" /> <input type="hidden" name="view" value="contact" /> <input type="hidden" name="id" value="<?php echo $this->contact->id; ?>" /> <input type="hidden" name="task" value="contact.submit" /> <input type="hidden" name="return" value="<?php echo $this->return; ?>" /> <?php echo JHtml::_('form.token'); ?> </div> </form> </div> -->
Regards,
Damien




Reply With Quote
