• 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 / show a field in pre-processing script

Hide / show a field in pre-processing script 3 months 2 weeks ago #43206

I have a script that autopopulate the fields of a form. But depending on the data, some fields are not wanted.

Wat I want to achieve is:

if ($val[-fieldX-] == 'yes') { //=== hide fieldY ====//; }

Is this possible and how to do this?
Last Edit: 3 months 2 weeks ago by willy.wolters.
The administrator has disabled public write access.

Hide / show a field in pre-processing script 3 months 1 week ago #43225

I made a workaround but I was wondering if there is a more elegant solution.

I have set an extra checkbox on the form with only one item and additional attributes: style="display: none" and readonly=”readonly”. So this field is not visible. (you can't use a hidden field in conditional fields ?!?).

In PHP scripts - Pre-processing next statement:
if ($val[-PLidnr-] > 0) { $val[-P-] = 'N'; } else { $val[-P-] = 'Y'; }

In conditional fields an extra test on field 'P' to show/hide other fields.
Last Edit: 3 months 1 week ago by willy.wolters. Reason: some quotes disappear
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!