• 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: $formlayout PHP

$formlayout PHP 11 years 4 months ago #26038

Can PHP if statements be evaluated within $formlayout? I'm attempting the following, but neither code block is being executed:

if (!empty($_GET)) {
<script type="text/javascript">
alert("batchid is set");
</script>
}
else {
$db = JFactory::getDbo();
$db->setQuery("SELECT `Batch_ID` FROM `#__tblbatch` LIMIT 1");
$varname = "batchid";
$value = $db->loadResult();
$newurl = $_SERVER . "?$varname=$value";
$app = JFactory::getApplication();
$app->redirect($newurl);
}
The administrator has disabled public write access.

$formlayout PHP 11 years 4 months ago #26048

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
You can't have PHP code within the Form Layout, but you can simply use the PHP Scripts > Scripts called on form display area for this.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 11 years 4 months ago by octavian.
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!