Form Parameters - Richard1320/php-form-processor GitHub Wiki
The form initialization requires all the field parameters. Everything is passed as a multidimensional array.
$config = array();
$config['recaptcha_site_key'] = 'xxxxxxxxxxxxxxxxxxxx';
$config['recaptcha_secret_key'] = 'yyyyyyyyyyyyyyyyyyyy';
$params = array();
$params['fields'] = $fields;
$params['config'] = $config;
$params['captcha'] = true;
$form = new Pfp\PhpFormProcessor\form($params);
Fields
Fields are all the fields in an array. Please check field params as to see how to setup the multidimensional array.
Config
Configuration settings are also passed as an array. Currently, there are only 2 configurations and they pertain to the reCAPTCHA. Additional settings may be added in the future.
Captcha
The plugin has Google reCAPTCHA integrated. This parameter sets it to on or off. In order for the reCAPTCHA to work, site and secret keys have to be set in the config array. Go to captcha keys to get your site & secret keys