close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

To reject on Like Entry

Thread began 7/09/2009 12:07 pm by quy355499 | Last modified 12/14/2009 6:10 pm by Jason Byrnes | 2016 views | 5 replies |

quy355499

To reject on Like Entry

Instead of passing on Like Entry, how to reject on Like Entry. For example, there have been many bogus submissions where the values of First Name and Last Name fields are the same. How to accomplish this? Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

Are you using client or server validation?

Sign in to reply to this post

quy355499

Server validation.

Sign in to reply to this post

Ray BorduinWebAssist

I suppose you could do it with a little php...

Use required validation on :

<?php echo((isset($_POST['firstField']) && isset($_POST['lastField']) && strtoupper($_POST['lastField']) == strtoupper($_POST['firstField']))?"fail":""); ?>

that should fail required validaiton if the two fields were the same... just a warning though... I knew a kid named "Jackson Jackson" in high school.

Sign in to reply to this post

webmaster286369

Client side reject on 'Like Entry' (with an ID number)

How can I do this same thing with client side validation? Basically it would allow an update or insert only if 2 fields DO NOT MATCH. Is there any way to make 'Like Entry' behaves as 'Not Like Entry'
Specifically, i want to prevent a user from creating cheque requisitions for himself as the recipient. Their own user id is automatically captured, and they input the recipient. I compare both fields, and don't want to allow if they match.
Help?

Sign in to reply to this post

Jason ByrnesWebAssist

When you apply like entry validatin, it creates the following function in the script tag:

function WAValidateLE(formElement,value1,value2,errorMsg,focusIt,stopIt,required)  {
var isValid = true;
if (!document.WAFV_Stop && !formElement.WAFV_Stop) {
if (value1=="" && required)
isValid = false;
if (value1 != value2 || (required && value1==""))
isValid = false;
}
if (!isValid) {
if (focusIt)
focusIt.value = "";
WAAddError(formElement,errorMsg,focusIt,stopIt);
}
}




if you change that to:

function WAValidateLE(formElement,value1,value2,errorMsg,focusIt,stopIt,required)  {
var isValid = true;
if (!document.WAFV_Stop && !formElement.WAFV_Stop) {
if (value1=="" && required)
isValid = false;
if (value1 == value2 || (required && value1==""))
isValid = false;
}
if (!isValid) {
if (focusIt)
focusIt.value = "";
WAAddError(formElement,errorMsg,focusIt,stopIt);
}
}




it will reverse it to fail if the two values are the same.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...