• 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: Validation rule for default value

Validation rule for default value 13 years 3 months ago #15935

  • bajou
  • bajou's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hello,

how can i put a Validation Rule for the default value display in the box, like Name for example? I tried Passphrase (set in default value), but not working.
Thanks
The administrator has disabled public write access.

Re: Validation rule for default value 13 years 3 months ago #15980

Hi,

I don't understand your question.
Can tell us what you exactly mean?
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
The administrator has disabled public write access.

Re: Validation rule for default value 13 years 2 months ago #16356

I also noticed the (apparently useless and definitely cryptic) Passphrase. What I want to do is to ask the visitor completing the form to retype their email address. I would then like RSForms Pro to compare the two email addresses (visitor has typed it twice). People send email addresses with errors in them and we are unable to contact them.

So, all I want is for both email fields to match before they can submit the form.
The administrator has disabled public write access.

Re: Validation rule for default value 13 years 1 month ago #16695

  • jym
  • jym's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Randall,

Did you ever solve this...I would like to know if there a solution...do you mind sharing if you did?
The administrator has disabled public write access.

Re: Validation rule for default value 13 years 1 month ago #16696

  • royce
  • royce's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
Here is how I did it for password fields.

1st define a javascript function for the form:
<script type="text/javascript">
	function checkEqual(f1, f2, fieldname) {
		if (document.getElementById(f1).value != document.getElementById(f2).value) {
			alert('The ' + fieldname + ' must be the same!');
			return false;
		} else {
		 return true;
		}
	}
</script>

I have 2 fields named 'password' and 'verifypassword' fields on the form. on the 'verifypassword' field, I have the following 'additional attribute':
autocomplete="off" onblur="return checkEqual('password', 'verifypassword', 'passwords');"

You should probably also have a check on the submit button or the form 'onsubmit' that the fields are equal, in case the user ignores the onblur alert.
The administrator has disabled public write access.
The following user(s) said Thank You: jonathan.guerrero
  • 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!