• 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: Help on validation rule

Help on validation rule 11 years 7 months ago #24888

Hi,

I'm not going to write this for you but i'm pointing you!
RsForms isn't able to solve this, so you have to solve this using javascript

Add this to the addittional attributes section of your drop down onchange="MyDateValidation();"
than goto the javascript section of your form an dcreate a new function.
There are a lot of these javascript examples to find on inet.

function MyDateValidation()
{
var mydropvalue = document.getElementById('myDropdownfieldname').value;
var myArrivelDate = document.getElementById('myArrivalfieldname').value;

if (mydropvalue.match('White') )
{
if ( (
myArrivleDate > 01-11-2013 && myArrivleDate < 30-11-2013
)
&& (
myArrivleDate > 01-04-2014 && myArrivleDate < 30-04-2014
)
)
// tell the customer what is wrong by adding your own text
// this is displaying a windows popup where user have to click "OK"
alert ('your own text'); //which should be goog validation
//for testing reasons use it, after testing comment out by using // before alert
else
{
alert ('your own other text'); //which should be wrong validation
//set the value of myArrivelDate back to null
document.getElementById('myArrivalfieldname').value='';
}
}
elseif (mydropvalue.match('Black') )
{
// do the same trick
}
else
{
// do the same trick
}
}
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!