• 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: how to insert text Behind this radio (PHP Scripts)

how to insert text Behind this radio (PHP Scripts) 10 years 7 months ago #28704

  • mr.tanwa
  • mr.tanwa's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I have 4 Track for register event
Radio 1 = Track A (limit 150)
Radio 2 = Track B (limit 150)
Radio 3 = Track C (limit 150)
Radio 4 = Track D (limit 100)

PHP Scripts
$radSelection = $_POST;
$db = JFactory::getDBO();
$db->setQuery("SELECT COUNT(`FieldValue`) FROM #__rsform_submission_values WHERE `FormId`='".$formId."' AND `FieldName`='track' AND `FieldValue`='".$radSelection."'");
$counter = $db->loadResult();
if($radSelection == 'Track D' && $counter >= 100){
$invalid[] = RSFormProHelper::getComponentId('track');
}elseif($counter >= 150){
$invalid[] = RSFormProHelper::getComponentId('track');
}

how to custom script for insert text (Full) Behind radio1 ,2,3 and 4

The administrator has disabled public write access.

how to insert text Behind this radio (PHP Scripts) 10 years 7 months ago #28706

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
A solution for this topic can be to use the scripts called on form display to count the submissions and use str_replace to change that specific item.

Example:
if(code for counter here){
$formLayout = str_replace('Track D', 'Track D <font color="red">(Full)</font>', $formLayout);
}
My help is not official customer support. To receive your support, submit a ticket by clicking here
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!