• 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: Newsletter Submit Integration

Newsletter Submit Integration 17 years 8 months ago #1184

  • eskwire
  • eskwire's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Has anyone added a field that when selected would submit the users email address to a newsletter component? I a user is going to take the time to submit information, I am interested in making it as easy as possible for that user to sign up for a newsletter.

I was thinking of any joomla based newsletter component such as acajoom or letterman or 3rd party application such as aweber or Constant Contact.

I would think with all of the flexibility RSform provides that it can be done.

Just curious if anyone else has tried or accomplished this functionality.

Thanks!
The administrator has disabled public write access.

Re:Newsletter Submit Integration 16 years 8 months ago #4285

I am interested in this option as well. I cannot find it in the documentation.
The administrator has disabled public write access.

Re:Newsletter Submit Integration 16 years 8 months ago #4298

I haven't done specifically what you're asking, but I think what I have done uses similar mechanics - inserting database data in tables of another Joomla extension in response to submission of a form. You're right that there is not much documentation on this kind of customization - it took me a lot of searching, forum questions, and support tickets to figure out everything I needed.

It can be done in the Scripts tab, the \"Script called on form process\". The kind of code I came up with, simplified but containing the key parts you probably need, is as follows:
if(isset($_POST['form']['submit'])) {
  $sql = \"INSERT INTO mytable(dbfield1, dbfield2, dbfield3 \";
  $sql .= \"VALUES('{$processform['text_field1']}', '{$processform['select_field2'][0]}', '\".addslashes($processform['textarea_field3']).\"')\";
  $database->setQuery($sql);
  $database->query();
  if ($database->_errorNum) die($database->stderr(1));
}
Note that the array structure for selectboxes (and checkboxes, although not shown here) is different than plain textboxes, so you need an extra \"[0]\" to get the value of the selected item. File uploads are another kettle of fish entirely, but you don't sound like you need that.

Hope this helps.
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!