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

Contact Enhanced Modal Warning window

13 years 5 months ago #4557 by jkidd
Is it possible to add a modal window which displays a warning message when the user clicks the send button?

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

13 years 5 months ago #4567 by douglas
Dear jkidd,

This would require a lot of custom work. A simple Javascript alert or confirm would be a bit easier.

What exactly do you need?

Best regards,

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

13 years 5 months ago #4580 by jkidd
The site that I am working on is for a Law Office, so when someone sends us an email through the contact page, they need to know that that email request does not establish an attorney-client relationship. The owner wanted this to come up in a litebox window if possible. The message would be triggered when the visitor hits the send button.

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

13 years 5 months ago #4581 by douglas
Dear jkidd,

I've been doing some tests and to use Joomla's default Modal window (SqueezeBox) would take a long time and to implement another modal window script will take also a lot of time, because I'll have to change a the way it triggers and handle the validation;

It would be much easier and faster to use a Javascript Alert for this case, at least for now. I'm trying to focus on the Joomla 1.6 development. I hope you understand.

Kind regards,

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

13 years 5 months ago #4582 by jkidd
Yes, I totally understand, and am very glad that you are working on 1.6 development. That will be very important in the near future.

Javascript is fine for now, and would you be able to give me some pointers on how to do that?

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

13 years 5 months ago #4583 by douglas
Dear Jkidd,

It is actually very simple;

Open [Joomla]/components/com_contact_enhanced/helper/helper.php

Find this line:
$html	.= ' <span><button class="button ce-button-submit" type="submit" onclick="return validateForm(this.form);">'.JText::_('Send').'</button></span>';
Change for this:
$html	.= ' <span><button class="button ce-button-submit" type="submit" onclick="alert(\'YOUR MESSAGE GOES HERE\');return validateForm(this.form);">'.JText::_('Send').'</button></span>';

If you need to add single slashes, please be sure to scape it;

That's it.

Best wishes,

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

13 years 5 months ago #4584 by jkidd
Amazing. The power of object-oriented programming at it's height!

Thank you so very much.

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

13 years 5 months ago #4585 by douglas
Any time! ;-)

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

13 years 5 months ago #4597 by jkidd
Now all of the original functionality of the form, such as required fields, and the alert messagge when required fields are left empty, are not working. I only changed the code as described above. My only question in that regard is what is meant by "If you need to add single slashes, please be sure to scape it;". Maybe this is where my problem is occurring.
Thanks in advance.

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

13 years 5 months ago #4598 by douglas
Dear Jkidd,

Can you provide a link to I can take a look at it?

Best regards,

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

13 years 5 months ago #4599 by jkidd
As soon as I move the site to a public server, I'll send you a link, and let you see. Sorry, but I'll have to wait until then. Thanks so much for your super timely support.

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

13 years 4 months ago #4661 by jkidd
Ok, good news!!! I got the site online now, so I think we are ready to go forward with your wonderful component! I think you will be able to see this, but the required fields on the email form are not working correctly anymore, since I made the change to the javascript function above.

The site is now at www.farmerandmorris.com

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