• Wordpress version: 4.9.5
    PDB version: 1.7.8.5
    PHP version: 7.1
    I managed to install a plugin to implement the pdb-before_validate_field function. I want to create custom messages when the email field in my entry is duplicate. This works fine when the data is initially entered. But when the user uses the [pdb_record] link and edits his entry, the check is applied again and fails, because indeed this email is already present. Is there a solution to this dilemma?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Roland Barker

    (@xnau)

    This has been fixed in the latest release.

    Thread Starter eehmke

    (@eehmke)

    This seems not to be the case. I have version 1.7.8.7 installed (since this morning) and still have the same issue. pdb-before_validate_field is executed again ein editing the exiting entry, and of course finds the already stored email address. How can i detect that the function is called in the edit mode, not the create mode?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @natriya Don’t hijack someone else’s topic, that’s not cool.

    You can provide information on your own topic.

    https://ww.wp.xz.cn/support/topic/edit-record-with-no-change-on-duplicate-check-fields/

    Plugin Author Roland Barker

    (@xnau)

    @eehmke can you confirm that you are sill experiencing this problem with version 1.7.8.8?

    Thread Starter eehmke

    (@eehmke)

    I can confirm that the function pdb-before_validate_field (my own funtion added by add_filter) is called again when the data is updated. But in my original code I had a database check for duplicate email. In the meantime I realized that PDB does this by its own, so I removed that check. So my problem seems to be solved.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘pdb-before_validate_field executed also when updated entry’ is closed to new replies.