Error when using form in modal popup

oloccina 17 Feb, 2016
I have created a simple form for my newsletter subscriptions

then I have inserted it in a modal popup using modals plugin

<h4 style="color: #666; margin: 5px 0px;"><strong>Iscriviti alla newsletter</strong></h4>
<p>Subito in omaggio 5 mandala in alta risoluzione della serie "I Colori della Luce"</p>
<p>{modal index.php?option=com_chronoforms5&chronoform=iscrizione-newsletter|title=Iscriviti alla Newsletter|width=300|height=350}<button class="btn btn-large btn-info">Iscriviti ora</button>{/modal}</p>

you can test here

it's the "iscriviti alla newsletter" module in the right sidebar, blue button

the form, when opened in the modal popup, works normally and the user is correctly subscribed to the list,
but there are a couple of issues:

1 - after the subscription the "thank you" message is showed in a new page instead that inside the modal popup,
I'd like it to appear in the popup window

2 - above the thank you message an error message si displaied saying:
Mailer Error: You must provide at least one recipient email address.

although as I said the email is being correctly subscribed

Thank you
GreyHead 17 Feb, 2016
Hi oloccina,

I think that you need to use an iFrame to have the thank you message appear in the Modal window (it might also be possible to do it using Ajax submission).

How do you have the email configured?

oloccina 17 Feb, 2016
Thanks Bob,
I set Ajax Submit to "yes", but while the modal popup is not being closed
automatically anymore, the thank you message is still not being loaded inside it,
it is loaded in the main website area below the modal popup, almost invisible to the users.

As per the iframe solution you were suggesting, I am not sure how to proceed :-(

My email action seems ok. I have a "dynamic to = email" setting, where "email" is the field holding
the user email.
This form is correctly sending a message to the users and subscribing them to the list, I just see that annoying error message above the thank you message.

Anyway, I attach a backup of this form if you want to take a closer look.

Thank you
GreyHead 17 Feb, 2016
Hi oloccina,

Please see the iframe setting in the NoNumbers docs here

Please remove the Reply To Email - it's not needed, (or add a matching Reply To Name).

oloccina 17 Feb, 2016
Thanks, that did the trick!

However, when I load the form using the iframe, the css is lost...
should I use custom code inside the form to call the css?
GreyHead 17 Feb, 2016
Hi oloccina,


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