Forums

Calendar field loos like a textbox!

GreyHead 03 Feb, 2012
Hi mhrde-boy ,

Youre site is loading two different versions of JQuery and is not loading the Joomla! MooTools library that ChronoForms requires. You need to remove one version of JQuery, put the remaingin version in noConflict mode and check why MooTools is not loading. Usually your template will do this with the line JHTML::_('behavior.mootools');

Bob
mhrde-boy 03 Feb, 2012
Hi GreyHead ,
Thanks for replay!

I tried to change the template, disable all modules but with no success !!

How can I find why the Joomla! MooTools library doesn't load?!

In fact, I have a lot of problems with CF in this wesite, for example: the upload field is not required, but the form can not be submited if the user did not upload a file.
I also tried to make the form send emails to different e-mail address by the third dropdown in the form (FAQ 31) but it didn't work! could that happened because of that the form is multilangual?!
However, there is something unclear about this feature: If I could send emails to different addresses based on dropdown selection, how can I set the template of the messages?!

Sorry for this annoyance, but I couldn't find answers for this questions in the forum 😶

Best Regards,
Mhrde-Boy
GreyHead 04 Feb, 2012
Hi mhrde-boy ,

Now it looks as though MooTools is loadig correctly but so is JQuery, you need to put JQuery into noConflict mode, otherwise it breaks the MooTools library and your validation will not work.

Bob
mhrde-boy 04 Feb, 2012
Hi GreyHead,

Thank you for your helpful replay, it was JB Library and I put it on noConflict =>the calendar and validation issue has been solved.
Thanks a lot!

But I still have a problem with upload field:
If the user did not uplaod a file, the form couldn't be sent!! (The upload field is not mandatory)

Try to fill the form please to see the problem...
------------

I have another form in the same site:
http://www.horazedu.com/index.php?option=com_chronocontact&chronoformname=contactus

The validation here still not working!!
Is there another porblem?!

Kind Regards,
Mhrde-Boy
GreyHead 04 Feb, 2012
Hi mhrde-boy,

There is a second version of the JQuery library loading for the other form - see the image below. This probably needs to be removed.

If this is the latest ChronoForms version 3.2?

If so there's a bug in the File upload code. Please see this post.

Bob
mhrde-boy 04 Feb, 2012
Thanks Bob!
You are a STAR!

The file fixed upload issue...

----

Regarding to the JQuery issue in the second form, I tried to disable the slideshow but the problem persist!
In the sildeshow parameters there is an potion to load JQuery or not, and I set it to (NO) but with no success.
How can I prevent this fill from loading?!

-----

Back to the first form:
http://www.horazedu.com/index.php?option=com_chronocontact&chronoformname=applicationform

I want to send emails to different addresses based on a dropdown. I tried to follow FAQ 31, Here is my code:
<div class="form_item">
  <div class="form_element cf_dropdown">
    <label class="cf_label" style="width: 150px;">NEARESTOFFICE *</label>
    <select class="cf_inputbox validate-selection" id="select_20" size="1" title="REQUIREDFIELD"  name="select_20">
    <option value="">SELECT</option>
      <option value="RIYADH">RIYADH</option>
<option value="JEDDAH">JEDDAH</option>
<option value="AUSTRALIA">AUSTRALIA</option>


and this is the code in / On Submit code - before sending email/
<?php
$emails_7 = array('RIYADH'=>'email1@hotmail.com', 'JEDDAH'=>'email2@yahoo.com', 'AUSTRALIA'=>'name_3@example.com');
$MyForm =& CFChronoForm::getInstance('applicationform');
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
$MyFormEmails->setEmailData(1, 'to', $emails_7[$_POST['select_20']]);
?> 


My form name is: applicationform and it is multilangual

Thanks for your great support
Kind Regards,
Mhrde-Boy
GreyHead 04 Feb, 2012
Hi mhrde-boy,

Yes, but there's another version now being loaded by widget-kit :-(

You much get your template and extensions under control!!

Please use your preferred web developer tools to see what is happening on your site: F12 in IE8 or IE9, Shift+Ctrl+I in Chrome, FireBug in FireFox, DragonFly in Opera.

Bob
mhrde-boy 04 Feb, 2012
Hello Bob,

I used firebug to see which js files load, but I noticed that these two pages:
http://www.horazedu.com/index.php?option=com_chronocontact&chronoformname=applicationform
http://www.horazedu.com/index.php?option=com_chronocontact&chronoformname=contactus

have the same js file, but as you see the first form works fine but the second not.

However, this is not a big issue, and I can accept the current situation.

---------

What about e-mails issue, did I make anything wrong in my codes?!
This is more important for me now...

Thanks for your help!
Kind Regards,
Mhrde-Boy
GreyHead 04 Feb, 2012
Hi mhrde-boy,

That's true they both are loading the same files - and if you add &tmpl=component to the URL of the second one you'll find that works Ok without the template.

I'm very sorry but this isn’t a ChronoForms problem. If you use jQuery on your site then you have to debug the problems that causes :-(

Bob
mhrde-boy 04 Feb, 2012
Hello Bob,

Thanks for quick replay!
I will keep searching for a soultion to jQuery problem.

But please help me with emails issue, did you find anything wrong with my codes?
Why FAQ 31 did not work for me?! 😟

Thanks in advance
GreyHead 05 Feb, 2012
Hi mhrde-boy,

Please see this post about emails. I think that there have been some other threads too.

Bob
mhrde-boy 05 Feb, 2012
Hello Bob,

I am using CF 3.2.0, but I tried to follow the post..
I made the following:

1) In "Setup Emails" tab, I have two Email Containers:
a- Dynamic To: user email, tells him that his message has been received.
b- Dynamic To: with the value email_to_use

2) In "Form Code >>> Form HTML" I have the following:
<div class="form_item">
  <div class="form_element cf_dropdown">
    <label class="cf_label" style="width: 150px;">NEARESTOFFICE *</label>
    <select class="cf_inputbox validate-selection" id="select_20" size="1" title="REQUIREDFIELD"  name="select_20">
<option value="">SELECT</option>
<option value="RIYADH">RIYADH</option>
<option value="JEDDAH">JEDDAH</option>
<option value="AUSTRALIA">AUSTRALIA</option>
</select>


3) In "Form Code >>> On Submit code - before sending email" I put the following code:
<?php
$recipient = JRequest::getString('select_20', 'RIYADH', 'post');
$emails = array (
  'RIYADH' => 'email1@hotmail.com',
  'JEDDAH' => 'email2@yahoo.com',
  'AUSTRALIA' => 'email3@example.com'
);
$form->data['email_to_use'] = $emails[$select_20];
?>


When I try to fill in the form, I get the following error:
You must provide at least one recipient e-mail address.

The user who send the email recieved a message (first Dynamic To)
But the admins from dropdown (RIYADH, JEDDAH, AUSTRALIA) do not get any emails!

Did I miss something?!
Thanks for your help

Best Regards,
Mhrde-Boy
GreyHead 05 Feb, 2012
Hi mhrde-boy,

Sorry, I forgot which version you are using. The code in FAQ31 should be what you want and the code in your earlier post looks OK.

What do you see if you turn Form Debug on?

Bob
mhrde-boy 05 Feb, 2012
Hello Bob,

I have a question here:
Is it enough to use the code in /On Submit code - before sending email/ field to send emails based on a dropdown?!
I mean: in Setup Emails tab I have only one email container with Dynamic To user email, tells him that his message has been received.
How can I design the template of email that will be sent to the admin (from dropdown) if I primarily didn't define the email in Setup Emails Tab?

Sorry for my English 😟 I hope that I made my question clear

Best Regards,
Mhrde-Boy
mhrde-boy 05 Feb, 2012
Hello Bob,

You can try now to fill in the form, I put it in Debug Mode
(Notice: the Englis translation is not completed yet)

Kind Regards,
Mhrde-Boy
GreyHead 05 Feb, 2012
Hi mhrde-boy,

I checked both forms, one has debug enabled but I don't see any sign of a Dynamic Email in use.

Bob
mhrde-boy 05 Feb, 2012
Hi Bob,
Please have a look at the attatched image...

I have just one email in (Setup Email) tab, and that's why I asked you earlier if I have to do something here.
I only put a code in On Submit code - before sending email and nothing else 😟

In fact I feel that I miss something in my form
GreyHead 06 Feb, 2012
Hi mhrde-boy,

Sorry, I was looking in the wrong place.

An email has been SENT successfully from (horazedu.com)info@horazedu.com to [email]user@example.com[/email]

This says that ChronoForms passsed the email to the Joomla! mailer and got an OK message back.

Bob
mhrde-boy 06 Feb, 2012
Yes, That's right!
The message does go to the user email that he enters in the form, but the problem is in the email which should go to admin email...

In this form:
<!-- w --><a class="postlink" href="http://www.horazedu.com/index.php?option=com_chronocontact&chronoformname=applicationform">www.horazedu.com/index.php?option=com_c ... cationform</a><!-- w -->
the third dropdown determines to which admin the message will be sent, I follow the FAQ 31 to send emails to admins based on a dropdown, but as I said before, no email is sent to admins (each selection in the dropdown is an email of one of the admins)

Hope I made my point clear,
and sorry if I mis phrasing :?

Kind Regards,
Mhrde-Boy
GreyHead 06 Feb, 2012
Hi mhrde-boy,

It may just be a result of the Arabic ltr script but it looks to me as though the options have spaces and carriage returns in them. I suggest that you replace these with something more like em1, em2, em3
<option value=" الرياض
"> الرياض
</option>
<option value=" جدة
"> جدة
</option>
<option value=" أستراليا
"> أستراليا
</option>

At present I see no sign at all of the second email in the debug listing.

Bob
mhrde-boy 06 Feb, 2012
Finally !!!

It works now, I used em1, em2, em3.

Can I desgin the email template which will be sent do admin? it's the same email that user recieves.

Thank you again for your great support Bob,
You Are A Star!

Kind Regards,
Mhrde-Boy
GreyHead 06 Feb, 2012
Hi mhrde-boy,

You can copy and paste the template over or create a new one.

Bob
This topic is locked and no more replies can be posted.