• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Invite a friend form - with optional extra emails

Invite a friend form - with optional extra emails 17 years 2 weeks ago #2793

  • Larnus
  • Larnus's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
First of all Fantastic script Alex! We've used it all over our website.

However, we're having some problems with trying to develop an 'invite a friend' form.


Problem 1:
On our 'Invite a Friend' form, we have the option of sending out 4 emails to friends. Only the first email is required (and validated).

We have the emails listed on the Notification Email as:

{email1},{email2},{email3},{email4}

The following errors come up if visitors only want to send to 1 friend (or less than the max of 4):

i) With default joomla mailer it says 'could not instantiate mail function', we fixed this by changing to sendmail in the joomla global config.

ii) After changing to 'sendmail' on site config, the 'mail function' error disappears, but the 'thank you' doesn't show up. The url then shows a messy url including session info (edited down for size!):

/newsarticle1.html?func=thankyou&did=fe2ca403a4bc1d25ac702787d3func=thankyou&did=bd1c1d85b89fc2cd21cfb0

It's obvious that because emails 2-4 are empty, the form is trying to send it to \",\" (comma) and fails.

We've tried to fix the problem by designing a 'form process' function which only adds comma's to 'filled-in boxes' by combining the emails into a single variable called '$CombinedEmails':
$processform['CombinedEmails'] = $processform['email1'];
 
if(isset($_POST['form']['email2']))
{  
    $processform['CombinedEmails'] = $processform['CombinedEmails'] . \",\" . $processform['email2'];
}

But we get a whole host of $string and T var errors etc.. (bad scripting I know! It's been a while :) )

Any solutions? Could RSForm just ignore empty email addresses?

For the time being we can live without the errors, but our concern is that the 'thank you' letter doesn't get returned (for that warm cozy community feel) and we have that 'messy url' to look forward to (if visitor decides to use the form again to send to a few more friends, then that messy url is sent to those new friends, which makes things a little worse!).


Problem 2:
Still on the 'invite a friend form', if you remember we have 3 optional emails. But there is no way for RSform to only 'validate the emails' if they have been filled in. So if someone fills in gibberish into the 'email3' box, it still gets sent through the mail.

What would be great if RSform gave you a choice to 'validate emails' but to give that field an 'optional/required' checkbox.

Look forward to any help on this.

Keep up the great work Alex!<br><br>Post edited by: Larnus, at: 2008/04/23 04:52
The administrator has disabled public write access.

any ideas to help this viral advertising? 17 years 2 weeks ago #2854

  • Larnus
  • Larnus's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
No-one with any ideas? I'm pretty sure a lot of people would find this really useful for viral marketing without having to resort to installing lots of other plugins when RSform will do :)
The administrator has disabled public write access.

Re:any ideas to help this viral advertising? 15 years 5 months ago #8982

  • rob.mew
  • rob.mew's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hi

Did you get a response for this? I have the same issue.

Thanks

Rob
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!