• 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: Can I hide a form using script?

Can I hide a form using script? 13 years 4 months ago #12154

Within the Script tab of an RSForm, I am using this to retrieve a registrationtype from Community Builder for each user.

Depending on the result returned, I either want to display the form or not.

Does anyone know what code I need below this to ensure the form does not display for 'User Type 1'???

Many thanks, Alex


$dbo =& JFactory::getDBO();
$query = "SELECT cb_registrationtype FROM #__comprofiler WHERE id =" . (int)$user->id;
$dbo->setQuery($query);
$this_regtype = $dbo->loadResult();

/*
if ($this_regtype=='User Type 1') return 0;
*/
The administrator has disabled public write access.

Re:Can I hide a form using script? 13 years 4 months ago #12156

Just found this and it looks helpful.

demo.rsjoomla.com/fex
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!