• 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 hide a field in another language

How to hide a field in another language 9 years 8 months ago #32276

Hello,

Ihave a form in tow languages. For one language I want de hide some field. But when I diasble a field for one language rsformpro does also hide the field in the other language.

How can I hide some fields for a language and show it in another language?

I know how to edit the form layout but I want to generate this automatically.
Last Edit: 9 years 8 months ago by kees.de.goeijer.
The administrator has disabled public write access.

How to hide a field in another language 9 years 8 months ago #32278

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
No default functionality for this, but you can use some PHP coding. Example:

Scripts called on form display area:
$lang =& JFactory::getLanguage();
$language = $lang->getTag();
if($language == "en-GB"){
	$style = '<style type="text/css">';
	$style .= '.fieldClassHere{display:none}';
	$style .= '</style>';
	$formLayout = $formLayout.$style;
}

Each field block has a specific CSS class assigned (you can check the page source or view this with an inspector tool, such as Firebug). Instead of the "fieldClassHere" CSS you should use your particular field class.
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!