Results 1 to 6 of 6

Thread: Validating two Form Edit fields equal

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    25

    Default Validating two Form Edit fields equal

    I am using NOF 2013 I have a form with several fields. I am trying to use the Form Validate tool using patternMatch to compare two of the fields. I can not seem to get this to work.

    I have tried using various methods of getting the data from the First field, with no success.

    Is there an easy what to do this?

  2. #2
    Junior Member
    Join Date
    Jun 2013
    Posts
    25

    Default

    Thank everyone for reviewing the topic.
    I found a work around by submitting the form to the next page and using database conditional options, I can check the two form edit fields being equal and produce an error.

  3. #3
    Senior Member franko's Avatar
    Join Date
    Apr 2010
    Location
    Tasmania Australia
    Posts
    2,617

    Default

    I have to admit I wasn't quite sure what it is you wanted to do and why. How about producing a short tutorial to illustrate?

  4. #4
    Senior Member LBA's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    543

    Default

    I've done this when asking the user to enter their email twice... and then using javascript to compare the two before moving on to process the form input.

  5. #5
    Junior Member
    Join Date
    Jun 2013
    Posts
    25

    Default

    LBA
    I tried using the php options that NOF uses to check the two values. I found this in ss_signup.php but I am not sure how to implement. I tried to do this at the time of the Submit button but I am not sure how to display the error and stay on the form.

    Any help would be appreciated.
    Franko:

    I have two field Password and retype password. I was trying to use the pattern option in for form validation section to matchpattern but I am not sure how to set patterns. I can not find any documentation on the patternmatch function. I looked at the ss_Signup.php for the secure site to see how NOF does this and it is done through a field comparison. However, I do not see how to high light the fields. The work around is fine.

  6. #6
    Senior Member LBA's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    543

    Default

    I did that aspect of the validation outside of NOF, using something like this http://lab.artlung.com/compare-fields/.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •