Page 1 of 1

Help with collecting address & and automatically send email

Posted: Wed Feb 04, 2015 2:50 pm
by jschudel
Hello everyone.

I am a CMSMS newbie and a bit stuck with this task:

I would like to add this functionality:
When a new customer comes to my page, I offer a give-away. However, in order to get the give-away that will be sent automatically by email, I need for the customer to fill in something like a contact form with all his information (name, address, email, phone...).
Upon him submitting his contact info, the system should then automatically send out an email to the new customer with an attachment (or alternatively with a download link).

Are there any modules like that for CMSMS?

My goal is to collect address data, and not to register members (like the SelfRegistration module offers).

Thank you for all your help!

Re: Help with collecting address & and automatically send em

Posted: Wed Feb 04, 2015 3:19 pm
by stefhoesli
UPDATE: Seems that Form Builder is the way to go! See below.

Have you looked at the "Simple Form" or the "CMSMailer" module? I personally would not attach the document to the e-mail, but send a link instead for three reasons:

1. Decrease bandwidth usage (probably not all users will actually want your give away and accordingly some will not download it).
2. Keep track of who actually downloads the give-away and who not. In order to get a clear mapping, you would have to create a unique ID in your link, so that this is passed back to your server.
3. If your give-away is large, then some people may consider it to be rude if you send it as attachment without getting their consent first.

Re: Help with collecting address & and automatically send em

Posted: Wed Feb 04, 2015 4:24 pm
by jschudel
Hi Stef.

Thanks for your ideas. Simple Form does not exist anymore, and CMSMailer doesn't seem to do what I am looking for. Also, I still cannot get a grip on formbuilder (which might be able to do such a thing because it is very extensive).

Any ideas where I still could get the "simple form" module?

Thank you.

Re: Help with collecting address & and automatically send em

Posted: Wed Feb 04, 2015 4:39 pm
by Jo Morg
jschudel wrote:Also, I still cannot get a grip on formbuilder (which might be able to do such a thing because it is very extensive).
You can start with any of the sample forms and with pretty simple customization you'd be set to go.

Re: Help with collecting address & and automatically send em

Posted: Wed Feb 04, 2015 8:50 pm
by jschudel
Hello Jan
Thank you for your PM. I am too "new" here in this forum, so I cannot send you a PM yet :) Weird but true.
In case you are reading this, yes, I would love your solution.
Thank you!
Jürg

Re: Help with collecting address & and automatically send em

Posted: Thu Feb 05, 2015 8:28 am
by stefhoesli
UPDATE 2: Seems that Form Builder is the way to go! See below.

I quickly checked how I do it: As a matter of fact, I don't use any module for this. PHP offers a mail() function (see here: http://www.w3schools.com/php/func_mail_mail.asp), which you can use easily.

UPDATE: I also had a look in the PHP Cookbook from O'Reilly: They recommend to use ezcMailComposer: http://ezcomponents.org/docs/api/trunk/ ... poser.html

Re: Help with collecting address & and automatically send em

Posted: Thu Feb 05, 2015 9:43 am
by jschudel
Thank you Stef.

I will definitely have to dive deeper into creating custom tags and also into form builder. Seems no way around it then :)

Jürg

Re: Help with collecting address & and automatically send em

Posted: Thu Feb 05, 2015 11:35 am
by paulbaker
I would use Form Builder for this, every time. The help is pretty good, install it and give it a try. It comes with a couple of simple forms pre-installed, you just need to add the {code} in your page. Come back with any questions!

Re: Help with collecting address & and automatically send em

Posted: Thu Feb 05, 2015 12:10 pm
by oliverseddon
Form Builder is more than capable of doing what your asking for.

I have uploaded a zipped up XML example that should get you up and running, email to and from addresses will need updating as well as the HTML email template for the 'Email' field.

http://www.threefolddigital.co.uk/Websi ... up.xml.zip

Re: Help with collecting address & and automatically send em

Posted: Thu Feb 05, 2015 12:21 pm
by Jo Morg
Besides, it makes no sense to me using an external lib (like the suggested ezcMailComposer) when CMSMS has it's own... if you are going to go through all the trouble to learn one, then better learn to use what you have at hand.

So yeah, I agree with paulbaker and oliverseddon. Once you have FormBuilder installed, it's easy to build any form and any amount of forms, without much confusion.

Re: Help with collecting address & and automatically send em

Posted: Thu Feb 05, 2015 2:41 pm
by jschudel
Thank you all for your help. So far so good.

What I am really struggling is the CSS formatting. Formbuilder does not seem to care of any custom CSS stylesheet I attach to any given form.

Any ideas or hints?

Re: Help with collecting address & and automatically send em

Posted: Thu Feb 05, 2015 3:01 pm
by Jo Morg
Read this: https://www.cmscanbesimple.org/blog/for ... stylesheet

and do some searching on the forums... there are plenty of posts about it...

Re: Help with collecting address & and automatically send em

Posted: Thu Feb 05, 2015 5:22 pm
by jschudel
Thanks once more, I am slowly learning and understanding the logic how things work together with FormBuilder.

Another question that came up now:

How and where can I define the width of the CAPTCHA input field?
Is there a certain class or id?

It seems that the CAPTCHA input field is considered as a text field. How can I give it its own class to format it independently from the other text inputs?

Thanks.