• 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: Unset mapping

Unset mapping 9 years 9 months ago #31754

Hello.

In a single form i have 4 mappings. Data is stored in internal (custom) tables.
How can I prefend a specific mapping from executing when a specific field is empty?

Example:
Mapping 1 should always be executed
Mapping 2 should only be executed if field is not empty

I tried this but without success:
if($_POST['form']['fieldname'] == ''){
	unset($mappings[1], $mappings[2], $mappings[3]);
}

Can someone point me in the right direction?
Last Edit: 9 years 8 months ago by administratie16.
The administrator has disabled public write access.

Unset mapping 9 years 9 months ago #31761

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

You'll have to use a similar approach as instructed here.
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.

Unset mapping 9 years 9 months ago #31774

Did some debug, the variable $mappings is null?
Do I need additional plugin?
The administrator has disabled public write access.

Unset mapping 9 years 9 months ago #31780

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

This variable is only available within "Script called after form has been processed" area (last bottom area from "PHP Scripts"). You can try adding the following snippet, assuming your form does have mappings set, and afterwards submit your form in the frontend area:

print_r($mappings);die();
This is not official customer support. To receive your support, submit a support ticket here.
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!