Highlighted

pdf form validatation formula

New Here ,
Jul 22, 2020

Copy link to clipboard

Copied

I have created a pdf form which I am trying to validate the user is entering a correct email address by reqyesting the user enter the email address twice.

What formula do I use to validate that the two fields are the same?

Thanks

TOPICS
PDF forms

Views

28

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

pdf form validatation formula

New Here ,
Jul 22, 2020

Copy link to clipboard

Copied

I have created a pdf form which I am trying to validate the user is entering a correct email address by reqyesting the user enter the email address twice.

What formula do I use to validate that the two fields are the same?

Thanks

TOPICS
PDF forms

Views

29

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 22, 2020 0
Adobe Community Professional ,
Jul 22, 2020

Copy link to clipboard

Copied

Compare the values of the two fields.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 22, 2020 0
Participant ,
Jul 23, 2020

Copy link to clipboard

Copied

on the properties of the second field under 'confirmation' check the 'run custom validation script' and enter the following:

 

//enter name of the 'original field'
var f = this.getField("Name_emailfield");

if (event.value == f.value){
    //field has same value as 'original field',approve
    event.rc = true;
}else{
    //field doesnt have same value,deny and dostuff?
    event.rc = false;
    // give warning(this is a popup but you can aslo show field with red warnings or w/e/)
    app.alert("Entered e-mail adres does not match",1);
}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2020 0
Most Valuable Participant ,
Jul 23, 2020

Copy link to clipboard

Copied

That would still allow the user to go back to the first field and change it without triggering an error... You should apply the same code there, too.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 23, 2020 1
Participant ,
Jul 26, 2020

Copy link to clipboard

Copied

Wouldn't the check fail each time due to the event.rc=false trigger triggering when the other field is empty?

 

Might be easyer to make a calculated third field that compares them and shows a warning underneath the input fields

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 26, 2020 0