Support Forum

Every time that you post a problem, PLEASE add the Joomla and the extension's versions and revisions (for example: Joomla 3.3.6, Contact Enhanced 3.3.5), PHP version and Server's Operating System. If you only manage only one site it is easier if you edit your profile and just add that information to your signature. Don't forget to add a detailed description of the problem. If possible, write down all steps to simulate the problem.

Before submitting a new post, PLEASE make sure you are running the latest version, test in different browsers (IE, FF, Chrome,..) and clear Joomla and browser's cache after every change you make.

Also, most questions are already answered in our FAQ and in iFAQ and Contact Enhanced documentation pages.

× Contact Enhanced is a contact component manager created to replace Joomla! core contacts component and add lots of advantages and new features (see Features ) and it offers many plugins and modules for several different purposes,
Product page | Documentation Page

Problem with "Thank You" Windows

14 years 7 months ago #955 by jasgrif11
Hi,

I'm having a problem with the "Thank You" window. I have 4 Contact forms on my website and if I go to the first form fill it out and submit I get a "Thank You" window. However If I then try to navigate to one of the other contact forms the "Thank You" window appears straight away before I even fill out the form.

All the forms submit successfully but I only receive the "Thank You" at the end of the first form and at the beginning of all other forms. This is the same case no matter which form I try to fill out first.

Also is it possible once the user clicks ok on the "Thank You" window that they are redirected to the main page of my site?

Mnay Thanks for the Support

Jason.

Please Log in or Create an account to join the conversation.

14 years 7 months ago #956 by douglas
Dear Jason,

Go to Components-> Contact Enhanced and select the Parameters button from the toolbar.
Set the "Thank you message" to Custom redirect and type index.php in the "Custom redirect" field.

Regards,

Please Log in or Create an account to join the conversation.

14 years 7 months ago #957 by jasgrif11
Thanks. However when I select "Thank You Message" all I see is Joomla Default, Show Sent E-mail Message and Javascript Alert.?

I'm not running the lastest version and haven't planned on moving as I made edits the the layout of my contact form in the back-end scripts.

Please Log in or Create an account to join the conversation.

14 years 7 months ago #958 by douglas
Dear Jason,

If you've modified only the views it shouldn't be hard to upgrade. Is your site live already?
Do you know which files you have changed?
Which version are you running?

Regards,

Please Log in or Create an account to join the conversation.

14 years 7 months ago - 14 years 7 months ago #963 by jasgrif11
Ok If I want the "Thank You" windwo to operate correctly then I need to install the next release.

The only edits I made were to the default_form.php, as I wanted all other field to be custom add ons from the backend. Below is my code. What is the best way to move everything over?

<?php
/** $Id: default_form.php 10381 2008-06-01 03:35:53Z pasamio $ */
defined( '_JEXEC' ) or die( 'Restricted access' );
JHTML::_('behavior.mootools');
$doc =& JFactory::getDocument();
$doc->addScript( JURI::root(). 'components/com_contact_enhanced/js/validate.js' );

$ce_cookie = JRequest::getVar( 'ce_cookie', '', 'cookie' );

?>
<script type="text/javascript">
<!--
function validateForm( frm ) {
var valid = document.formvalidator.isValid(frm);
if (valid == false) {
// do field validation
if (frm.email.invalid) {
alert( "<?php echo JText::_( 'Please enter a valid e-mail address.', true );?>" );
} else if (frm.text.invalid) {
alert( "<?php echo JText::_( 'CONTACT_FORM_NC', true ); ?>" );
}
return false;
} else {
frm.submit();
}
}
Window.onDomReady(function(){
document.emailForm.screen_resolution.value=screen.width +"x"+ screen.height;
});
// -->
</script>
<?php if(isset($this->error)) : ?>
<tr>
<td><?php echo $this->error; ?></td>
</tr>
<?php endif; ?>
<tr>
<td colspan="2">
<form action="<?php echo JRoute::_( 'index.php' );?>" method="post" name="emailForm" id="emailForm" class="form-validate">
<div class="contact_email<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<small id="requiredsign"><?php echo JText::_('REQUIRED_SIGN_DESC'); ?></small>
<br />
<label for="contact_name">
<?php echo JText::_( 'Enter your name' );?> *:
</label>
<br />
<input type="name" name="name" id="contact_name" size="30" class="inputbox required" value="<?php echo (isset($ce_cookie) ? $ce_cookie : $this->user->get('name') ); ?>" />
<br />
<label id="contact_emailmsg" for="contact_email">
<?php echo JText::_( 'Email address' );?> *:
</label>
<br />
<input type="text" id="contact_email" name="email" size="30" value="<?php echo (isset($ce_cookie) ? $ce_cookie : $this->user->get('email') ); ?>" class="inputbox required validate-email" maxlength="100" />
<br />
<input type="hidden" name="subject" id="contact_subject" size="30" class="test" value="<?php echo (isset($ce_cookie) ? $ce_cookie : '' ); ?>" />
<br />
<?php

$jsValidation ='';
echo $this->_loadCustomFields($this->customfields,$jsValidation);

?><br />

<?php if ($this->contact->params->get( 'show_email_copy' )) : ?>
<br />
<input type="checkbox" name="email_copy" id="contact_email_copy" value="1" />
<label for="contact_email_copy">
<?php echo JText::_( 'EMAIL_A_COPY' ); ?>
</label>
<?php endif; ?>
<br />

<?php
// Get params and component configurations
$pparams = &$mainframe->getParams('com_contact_enhanced');

if($pparams->get( 'captcha_systems', 1) > 0 ){
$dispatcher =& JDispatcher::getInstance();
// Process the content preparation plugins
JPluginHelper::importPlugin('content');
$results = $dispatcher->trigger('onAfterDisplayForm', array (& $item, & $item->params, 0));
}
?>
<br />

<button class="button validate" type="submit"><?php echo JText::_('Send'); ?></button>
</div>

<input type="hidden" name="option" value="com_contact_enhanced" />
<input type="hidden" name="view" value="contact" />
<input type="hidden" name="id" value="<?php echo $this->contact->id; ?>" />
<input type="hidden" name="task" value="submit" />
<input type="hidden" name="screen_resolution" value="" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<br />
</td>
</tr>

Please Log in or Create an account to join the conversation.

14 years 7 months ago #964 by douglas
Dear Jason,

I was looking in your code and it will be easier if you redo all your changes, because since this version I've done at least two big changes, like:
- Moved all core fields to Custom Fields;
- Changed the captcha validation a little bit;

I haven't created an update script for this version, so you have to:
- Backup your data from tables jos_contact_enhanced_details and jos_contact_enhanced_cf (do not restore the table structure)
- Uninstall Contact Enhanced;
- Install the latest version of Contact Enhanced;
- Restore your backed up data (once again, only the data, do not restore the table structure);

For the next version, I'll create an update script, which will make things much easier.

Regards,

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Copyright © 2018 IdealExtensions.com. All Rights Reserved.

This site is not affiliated with or endorsed by the Joomla!™ Project. It is not supported or warranted by the Joomla!™ Project or Open Source Matters™. The Joomla!™ logo is used under a limited license granted by Open Source Matters™, the trademark holder in the United States and other countries.
We may collect your IP address and your browser's User Agent string while using our site for security reasons and deriving aggregate information (analytics). This information is retained for a minimum of 1 and a maximum of 24 months.
Feedback