0
Hope you can point me in the right direction.
How would I insert an RSForm field value into the 'name' or 'Extended Namefield' of the API?
Thanks,
Doug
How would I insert an RSForm field value into the 'name' or 'Extended Namefield' of the API?
Thanks,
Doug
Responses (3)
-
Accepted Answer
-
Accepted Answer
0Hi Germinal!
Thank you for the reply!
I am placing the API code in the "Script called on form process" section of RSForms. I believe this code block is run when the user hits the submit button on the form. My testing thus far seems to prove this true.
I am not a programmer and so I don't know the correct syntax to place the html input field "affiliate_test" into the php array of the API. I have tried replacing "Custom Order" with affiliate_test and with $affiliate_test and about 100 variations. I just don't know how to make "Customer Order" = the value of the data entered into the form field affiate_test. Sorry for my ignorance.
$conversion_data = array(
"name" => "Custom Order",
"component" => "com_yourcomponent",
"extended_name" => "The item name",
"type" => 1,
"value" => 100 ,
"reference_id" => 234,
"approved" => 1,
);
require_once(JPATH_SITE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_affiliatetracker'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helpers.php');
AffiliateHelper::create_conversion($conversion_data, $user_id); -
Accepted Answer
Your Reply

Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »