An error has occurred while validating the configuration settings

Create a function in your main plugin file for this.

We will need this same array later when running the processor, so having a function that we can use twice is important.

I like to have a separate function that does the actual check if the value is valid, that way, if needed I can reuse that function elsewhere. You might be able to use a hardcoded array here, or you may do a database lookup.

an error has occurred while validating the configuration settings-70an error has occurred while validating the configuration settings-54an error has occurred while validating the configuration settings-6

This just adds one field “field-to-validate”, but you could add more fields if you needed to.

Note that we are setting the argument “magic” to true, which enables the magic tag binding button and auto-complete.

Now, in the file of the processor plugin, we just need to add one line to create the processor UI: Feel free to add additional HTML or even inline Java Script here.

Now we are going to add the pre_process callback function that will preform the validation.

Caldera Forms processors can act at any, or all of these three stages of form submission processing: All of the code for this tutorial can be found in a Git repository.

Feel GPL free to fork that repository as the basis for your own Caldera Forms processor.While using this class is not technically required, it is highly recommended.Using this class is super easy, and ensures that your processor UI will display and save properly.When you have a form with unique needs, such as one that powers a registration systems, you may need to create a custom validation for a specific field.For example, if you need to check if a field value matches a list of allowed values.It could even be the basis for a cool add-on plugin.

Tags: , ,