• Resolved ziskar364

    (@ziskar364)


    Hi I would like to ask if we can validate the form fields not only in the frontend but also in the php.

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

    (@wpmudev-support8)

    Hi @ziskar364

    I hope you’re well today!

    Form can be set to use server-side validation (via the “Validation” setting in “Behavior” section of form configuration) but this only changes the “method” and still doesn’t let you validate in custom way.

    Do do some custom validation (as I suppose that’s what you mean – custom validation of data via your own PHP script) you would need to hook your custom PHP code to the Forminator’s “_submit_errors” filter hook.

    Here is an example of how to do this:

    https://gist.github.com/adczk/728fff7d4061eff16bcd60593eba337d

    This particular example is is about preventing submission of the same data multiple times but the code can be modified to do pretty much any kind of validation. Take a look into it and if you have any additional questions, let us know, please.

    Best regards,
    Adam

    Thread Starter ziskar364

    (@ziskar364)

    Dear Adam, thank you very much for your quick response and useful information.
    I will try and let you know if any further assistance is necessary.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Form fileds php validation’ is closed to new replies.