• 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: Hide certain fields if logged in

Hide certain fields if logged in 2 weeks 4 days ago #43401

  • AlexR
  • AlexR's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
Is it possible to add a condition or via code to hide certain fields in a form if the user is logged in?
The administrator has disabled public write access.

Hide certain fields if logged in 2 weeks 1 day ago #43406

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 722
  • Thank you received: 59
Hello,

For this scenario you will require custom scripting. First you you will need to check if the user is logged in or not, an example on this can be found here:
www.rsjoomla.com/support/documentation/r...e-original-form.html

After confirming this you could try using the str_replace() PHP function in a custom code snippet in PHP Scripts > Scripts called on form display that will add a specific class to the container of your form fields that will hide them in the front-end when the user is logged in. You can use the $formLayout variable for this purpose, this contains the HTML code of the form.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
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!