Forms. Help!

Hey Everyone!

Recently I took on a website job for an e-card company, and was able to bid a low price due to a WP plugin that existed with the functionality they desired.

Fast forward a few weeks, and we’re almost finished with the project, & both us and the client are quite happy with it!

However, they had two questions about specific functionality that’s a bit over my head when it comes to PHP (I dabble, and I can somewhat read code, and almost all I’ve learned/understand comes directly from WP)

Firstly, as the site is now, it is only possible to submit an e-card to a single person/email address; they were wondering if it was possible to send the same card out to multiple email addresses at the same time.

Secondly, the user currently MUST preview the e-card before they can send it. The client was also wondering if it would be possible to create a ‘send now’ button, and skip the preview altogether.

http://cloudfarmstudio.com/OTB/ is the current URL; check it out if anyone has time, and if you think there’s a fix we could apply to address either issue, I’d be pretty stoked/thankful!

Thanks everyone! =)

-Rick

Hi Rickeh,

The things that you have asked for are possible and quite simple according to me but it will require bit of customization in the plugin that you have used.

  1. You can send it to multiple e-mail addresses. Have you heard of for() loop. Try using it in your code.

  2. You need to skip (i.e comment/delete) the code for preview.

As I said earlier it is easy task for a person who is good at customizing wordpress plugins. But in your case you might need to take help of some expert. We can’t customize the plugin for you!

Cheers!

Hi Rick,

Sending email to multiple recipients is always possible. I would suggest you ask your user to input emails and separate them with a comma.

Clue: use loop() and explode() function to break them into an array.

Your code should look like:
[php]
$email="[email protected], [email protected], @c@domain.com";
$arr=explode(",", $email);
/*
Your array looks like this:
$arr[0]=‘[email protected]’;
$arr[1]=‘[email protected]’;
$arr[2]=‘[email protected]’;
*/
//play around with loop based on your array size to accomplish this…
[/php]

As to preview, you can use jQuery…

Sponsor our Newsletter | Privacy Policy | Terms of Service