• 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: Conditional Validation

Conditional Validation 10 years 6 months ago #29332

Can anyone point me to php script which will effectively perform :
If fieldA has been input then fieldB must also be input
The administrator has disabled public write access.

Conditional Validation 10 years 6 months ago #29336

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
Try using a code like this one:
$first = strlen($_POST['form']['first_field_name']);
$second = strlen($_POST['form']['second_field_name']);
 
if( $first > 0 && $second == 0 ){		
	$invalid[] = RSFormProHelper::getComponentId("second_field_name");
}
My help is not official customer support. To receive your support, submit a ticket by clicking here
The administrator has disabled public write access.
The following user(s) said Thank You: fyistudio
  • 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!