• Resolved kizha

    (@kizha)


    Hello,

    I was wondering if I can have this functionality using forminator and custom fields,
    so I’m using forminator to get data from users when they want to add a non-existing book to my book reviewing web application. I’ve already done all of this but hadn’t thought of the fact that users can add the same book over and over again, I’m trying to stop this with the use of a primary key. I’ve added the books ISBN as a custom field of my CPT “book” to the forminator form and I’m basically wondering if there’s any way I can make the ISBN field to act like a primary key? Can I do this using forminator?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @kizha

    I hope you’re well today and thank you for your question!

    If I correctly understand: if ISBN submitted by user already exists in the DB, it should stop form submission and user should not be able to add such book, right?

    Currently it wouldn’t be possible out of the box, I’m afraid. We’re planning to add a sort of “custom validation” options to the plugin in Future which would make it easier to “hook up” to it to run some “custom check” on this but I don’t have an ETA. It would still require some amount of custom coding, I think.

    For now, it would have to check submitted ISBN, then check if custom field of a given name and that value already exists and then either trash already added “draft” post (easier as it wouldn’t require hooking up to Forminator) or to hook up to Forminator to actually stop it from submission.

    I’m afraid that would have to be entirely custom developed from scratch which is a bit outside of this support scope.

    Kind regards,
    Adam

    Thread Starter kizha

    (@kizha)

    Yes, you got my question right. Thanks for the detailed response anyway!

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @kizha

    I’m marking this ticket as resolved,

    However, feel free to let us know if you have any further question.

    Best Regards
    Patrick Freitas

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Primary key for Custom Field’ is closed to new replies.