The Form does not send email neither save to db

cmc 25 May, 2012
I read a lot of forum posts, all guides and I watch a couple of video but I really am not able to put my very simple form at work. The form ask only for an email and I need to receive that mail and save it to a db table. I configure all the options several time with no success. I attach to this message a backup of the form. Can you help me?
A page test is: http://ilmiositojoomla.it/test-landing-page
Thank you very much.
cmc
GreyHead 26 May, 2012
Hi cmc,

You have added a Submit URL and, as the help note says: 'Adding a submit URL will disable all the form "on submit" event functions.'

If you remove it then the form should work OK.

Bob
cmc 26 May, 2012
Yhank you very much for your quick replay. I confused "submit URL" with "redirect user URL", now all is working fine.

I have a second question: I put several instances of the same form in a landing page using the ChronoForms Plugin. The unique text field (that ask for an email address) is mandatory but on the first instance is working, while on subsequent instances the mandatory parameter is ignored and the form send email and write to db without stopping the user if you don't write anything in the text box (sorry for my english...).

The form is the same attached to the previous post and the page is:
http://ilmiositojoomla.it/il-tuo-sito-non-ti-piace

What has happened?
Thank you.
cmc
GreyHead 26 May, 2012
Hi cmc,

You can't use the same for multiple times on the same page :-( Apart from anything else HTML requires unique element ids and your forms all have the same id.

The simplest solution is probably to make the whole article into a form with multiple submit buttons.

Bob
cmc 26 May, 2012
Reading your reply I founded another solution: I duplicated ten times the form (with copy function) and named form01, form02, ..., form11 (five minutes), put 11 different form on the page and now they work
http://ilmiositojoomla.it/il-tuo-sito-non-ti-piace
In this way all forms write on the same db table (this is what I need).

A last question: can I also write on the table the name (or ID) of the form that is writing that record?

Thank you.
cmc
GreyHead 26 May, 2012
Hi cmc,

You can get the form name from $form->form_details->name so adding this to a Custom code action in the On Submit event will let you save it to the database table
<?php
$form->data['form_name'] =& $form->form_details->name;
?>


Bob
cmc 26 May, 2012
Thank you very much. Now all is working fine. Great extension!
cmc
This topic is locked and no more replies can be posted.