Forums

Strange problem - IE sends two e-mails

tsili 20 May, 2011
I have a form that works perfectly in all browsers (Joomla Version: 1.5.23).
The problem is that when someone submits a form through IE, the mail is sent twice:
One with the correct data and one with only the template fields like this:

<p><strong>Name</strong>: {Name}</p>
<p><strong>Organization</strong>: {Organization}</p>
<p><strong>Country</strong>: {Country}</p>
<p><strong>E-mail</strong>: {E-mail}</p>
<p><strong>URL</strong>: {URL}</p>


Moreover, the 'bad' mail has no sender or title.

In all other browsers (Firefox, Safari, Chrome) the form is sent only once and everything looks fine.
Any idea?

Thanx!
GreyHead 20 May, 2011
Hi tsili,

There is nothing that I can think of that is browser specific in the code to send emails.

By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.

Bob
tsili 20 May, 2011
Hi GreyHead,

I 've just sent you the details by mail.

Thanx for everything!
GreyHead 20 May, 2011
Hi Tsili,

You have a form name of 'Join-Us' and at least one input name 'E-mail' which have dashes in them. W know that dashes can sometimes cause problems so I suggest that you rename these using unders-scores, or nothing at all e.g. join_us or joinus / e_mail or email.

I strongly recommend that you do *not* use the Dynamic From Email element in your Email Setups. Using this often results in your emails being marked as spam and dropped into a spam filter. Instead use the static From Email with an address that matches the site domain name and use Dynamic ReplyTo Email for the user email. The result is the same but with a much better chance of good delivery.

Bob
tsili 20 May, 2011
Hi Bob,

First of all, thank you very much for taking the time to look into this.
I tried all of your suggestions but the problem still exists😟
Anything else I can try? The only thing I can think of is creating two new forms identical to the old ones...

Cheers
GreyHead 20 May, 2011
Hi tsili,

Just tried to look again but the login no longer works - or at least I can't login.

Bob
tsili 20 May, 2011
Sorry Bob,

you can try again.
I thought you wouldn't need it anymore so I deleted it.
The only thing I reverted back to my original settings was the Dynamic From Email etc. cause when I did it your way, mails were marked as spam!

Thanks
GreyHead 20 May, 2011
Hi tsili,

Took another look but I don't see anything on your form setup, or in the CF code to suggest why this might be happening :-( Nor do I remember hearing it being reported before.

It might be related to the File Uploads action, there have been some reported bugs in that in another thread.

Bob
megana 20 May, 2011
You're not using a form in the module too are you? I'm having a similar problem, but I have a form on the page and a form in a module. When I submit either form, I get emails as if I'd filled out both of them! Oddly, it's not a problem on my OTHER J1.6 site using the same version of ChronoForms and a similar setup with the two forms.
GreyHead 21 May, 2011
Hi megana,

I think this might happen if both forms have the same name. But shouldn't do otherwise.

Bob
tsili 23 May, 2011
@megana: I only have one form, published in a module position.
@Bob: OK Bob, thanx. Is it possible someone to test the problem I am facing to see if it's a bug or not?

Cheers
GreyHead 23 May, 2011
Hitsili,

By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.

Bob
tsili 24 May, 2011
Hi Bob,

I believe you are referring to megana cause you have already checked my site!

Cheers
Max_admin 31 May, 2011
Hi guys,

If you have 2 forms on 1 page (e.g: 1 in a module and another in the body or another module) then when you submit both forms will be submitted and any on submit actions on both will run, the solution to this issue is 1 of 2 things:

1- you disable the "Relative URL" setting in your form's "Edit" page, but this may still run the module's form submit stuff.
2- add some server side check in the onSubmit event for the module's form to check that the form submitted is the one in the module.

I will try to improve this in the coming version

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
heru 05 Jun, 2011
Fast hack to solve issue until next release (works only as module integrations)

[list=1]
  • cfaction_show_html.php ( \administrator\components\com_chronoforms\form_actions\show_html )
    Line 110
    Added extra parameter to render function, indicating de ID of the form:
    $output = $HTMLFormPostDataLoad->load($output, $form->data ,array(),$form->form_details->id);

  • data_republish.php ( components\com_chronoforms\libraries\includes )
    Line 5: get new parameter
    function load($html_code, $data = array(), $params = array(),$id=''){

    Line 175: If id is set put has hidden in the form
    if( $id != '')
             $html_code .= "<input type='hidden' name='xtra_id' value ='{$id}' />";

    Now each for identifies himself has xtra_id POST value (working in module integrations)

  • helper.php (modules\mod_chronoforms)
    Line 22:
    if ( $event == 'submit' && $form->form_details->id != $_POST['xtra_id'] )
              $event = 'load';

    If event is submit & post id isnt the actual processed id, change event to "load"
  • [/list:o]

    PS: if post is duplicated please remove this one
    This topic is locked and no more replies can be posted.