• 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: RSevents generating tickets with RSForms fields

RSevents generating tickets with RSForms fields 11 years 3 weeks ago #27020

  • praes
  • praes's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 2
For an event I needed to generate an PDF ticket with some submission information. This information is stored in the RSForm fields, but by default not enabled in the PDF string replacement. My solution is this small addon and I would like to share it with the community. Tips are welcome!

#components/com_rseventspro/helpers/pdf.php
#Add to line 191
// Praes modified
$query->clear()
	->select($db->qn('FieldName'))->select($db->qn('FieldValue'))
	->from($db->qn('#__rsform_submission_values'))
	->where($db->qn('SubmissionId').' = '. (int) $subscription->SubmissionId);
$db->setQuery($query);
$fields = $db->loadObjectList();
 
if(is_array($fields)) {
	foreach($fields as $fieldnr => $fieldvalue) {
		$layout = str_replace("{".$fieldvalue->FieldName."}", $fieldvalue->FieldValue, $layout);
	}
 
}
// End Praes modified
 
 
#/plugins/system/rsepropdf.php
#Add to line 76
$query->clear()
	->select($db->qn('SubmissionId'))
	->from($db->qn('#__rseventspro_users'))
	->where($db->qn('id').' = '.(int) $userid);
 
$db->setQuery($query);
$subscription = $db->loadObject();
 
$query->clear()
	->select($db->qn('FieldName'))->select($db->qn('FieldValue'))
	->from($db->qn('#__rsform_submission_values'))
	->where($db->qn('SubmissionId').' = '. (int) $subscription->SubmissionId);
$db->setQuery($query);
$fields = $db->loadObjectList();
 
if(is_array($fields)) {
	foreach($fields as $fieldnr => $fieldvalue) {
		$layout = str_replace("{".$fieldvalue->FieldName."}", $fieldvalue->FieldValue, $layout);
	}
 
}
Last Edit: 11 years 3 weeks ago by praes.
The administrator has disabled public write access.
The following user(s) said Thank You: sulafresh

RSevents generating tickets with RSForms fields 10 years 10 months ago #27678

Thank you very much! I was much help.

What if I want to be able to use these fields in the mail that is sent to the owner of the event?

Can you think how?

Thank you very much.
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!