• 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: Append a database table w/ source value from URL?

Append a database table w/ source value from URL? 13 years 7 months ago #11390

  • patrick.egan
  • patrick.egan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
Hello...

I am hoping The RS Community can help me with a slight problem I am having:

On our site we use RS Forms to collect data about our users... Each time a user fills out an rsform on the site it back-fills / maps the fields info to their JomSocial profile fields so we have their complete information.

Currently we just replace the information in their JomSocial profile fields each time they fill out a form... This is fine... It keeps their information current....

EXCEPT WE HAVE ONE SMALL PROBLEM:

We would like to be able to have an additional hidden field that we just append information to... NOT REPLACE!

For Example... I will add a JomSocial field that is just for internal use... It will be used to track SKU / Source numbers from our users....

When a user fills out a form there will be a hidden field that populate with a SKU / Source number in the URL (I do this with a script in the default value field)
//<code>
$user =& JFactory::getUser();
$user_id = $user->get('id');
if ($user_id != 0)
{
$user_id = intval($user_id);
 
$rez = mysql_result(mysql_query("SELECT value FROM jos_community_fields_values WHERE user_id=".$user_id." AND field_id=23"),0);
return $rez;
}
//</code>

HERE IS THE PART I NEED HELP WITH...

That SKU / Source field must APPEND the JomSocial field... Not replace it each time!

So say a user fills out forms # 1 through 3 with corrisponding source numbers 1, 2, 3

The JomSocial Field would show a record of that like 1,2,3

And any additional forms they fill out would just add to the list.... So if the same user filled out form #20 a month later the JomSocial field would read:

1,2,3,20


Basically I need a SELECT query in order to get the values that were previously submitted.

After this, I need to generate the new values that I wish to add in the tables and with an UPDATE query, add the values to the tables.

I would like to use this in the "Scripts called after form process" section?!?!
Last Edit: 13 years 7 months ago by patrick.egan. Reason: More Information
The administrator has disabled public write access.

Re:Append a database table w/ source value from URL? 13 years 7 months ago #11424

  • patrick.egan
  • patrick.egan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
Anyone have thoughts on this?
The administrator has disabled public write access.

Re:Append a database table w/ source value from URL? 13 years 7 months ago #11466

  • patrick.egan
  • patrick.egan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
Would still really like to see a solution to this if anyone has ideas?
The administrator has disabled public write access.

Re:Append a database table w/ source value from URL? 12 years 10 months ago #14081

  • jasperli
  • jasperli's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello,

I am looking for the same info for collecting and replacing jomsocial fields.
Would you be so kind to share your solution with me?
Thnx

Jasper
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!