Website Membership profile to email

By mattbcd - July 5, 2011

Hi

I need to create a form which packages certain items of a user's membership profile (e.g. name, address) with a couple of extra options and sends them to a separate email so they can receive a paper.

I'm sure this is quite straightforward in reality, but I can't work out how to do it. I've attached a grab of the page as it looks at present. My ideal would be for the logged in user to be able to select one of the papers, hit 'Send Request' and be then sent to a confirmation page. A rep would receive this email and arrange for delivery.

Any help would be grovellingly received!

Matt
Attachments:

pubrequest_grab.jpg 130K

Re: [mattbcd] Website Membership profile to email

By Jason - July 5, 2011

Hi Matt,

To help get us started, could you tell me how far you've gotten so far? What happens currently when someone hits "Send Request"? When someone is on this page, are they already logged in? How is the rep's e-mail address being stored?

Any information you can send to clarify would be helpful.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Website Membership profile to email

By mattbcd - July 6, 2011

So far, I've put the buttons on the page (as they needed a visual to approve) and that's it - I haven't created a form as yet. The user has to be logged in to see this page.

I've created a section in CMS called singleRep, which contains the email address of the rep.

Re: [mattbcd] Website Membership profile to email

By Jason - July 7, 2011

Hi,

If you take a look at the sample signup form that comes with the membership plugin, you'll see an example of how to send an email. Any information that you need to put into the email from the user that's logged in can be accessed through the $CURRENT_USER variable. For example, you can get the email address of the current user like this:
$CURRENT_USER['email']

Finally, you'll need to find a way of getting the correct "singleRep" email based on a selection that the user made.

One other suggestion, you may want to use radio buttons instead of check boxes so that a user can only make a single selection.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Website Membership profile to email

By mattbcd - July 8, 2011

Thanks Jason. I'll have a go!

Re: [mattbcd] Website Membership profile to email

By Jason - July 20, 2011

Hi,

If you user already exists, you don't need to any of the code that would create a user, generate a password, or make entries to access list.

If you wanted to save their selections to their account, you would have to add a mySQL UPDATE statement to do so (take a look at the example profile page). If you don't want to save their selections, you won't need that either.


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [mattbcd] Website Membership profile to email

By gkornbluth - August 1, 2011

Hi mattbcd,

Just curious if you got this working and would be willing to share your solution.

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php