• 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: custom script if condition not working on dropdown

custom script if condition not working on dropdown 4 years 4 days ago #41193

  • ese105
  • ese105's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
hi..

field attend is dropdown field. when i select Symposium from my dropdown my php script not working
if($_POST['form']['attend'] == "Symposium"){
$db->setQuery("SELECT fieldvalue FROM #__rsform_submission_values WHERE FormId='".(int) $formId."' AND FieldValue LIKE 'A%' ORDER BY SubmissionValueID DESC LIMIT 1 ");
$code = $db->loadResult();
$code = preg_replace('/[^0-9]/', '', $code);
$code = $code+1;
$code = str_pad($code, 3, '0', STR_PAD_LEFT);
$conftype = 'A';
}
Last Edit: 4 years 4 days ago by ese105. Reason: add code
The administrator has disabled public write access.

custom script if condition not working on dropdown 4 years 4 days ago #41194

  • ese105
  • ese105's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
i have solved it.. must include array for dropdown
if($_POST['form']['attend'][0] == "Symposium"){
$db->setQuery("SELECT fieldvalue FROM #__rsform_submission_values WHERE FormId='".(int) $formId."' AND FieldValue LIKE 'A%' ORDER BY SubmissionValueID DESC LIMIT 1 ");
$code = $db->loadResult();
$code = preg_replace('/[^0-9]/', '', $code);
$code = $code+1;
$code = str_pad($code, 3, '0', STR_PAD_LEFT);
$conftype = 'A';
}
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!