matador_get_the_bullhorn_lead_form( array $args ): string
Outputs a Bullhorn Lead Form.
Description
The matador_get_the_bullhorn_lead_form() template function returns a lead form string generated based on passed arguments.
Parameters
array $args (optional): A associative array of arguments of the following shape:
array|string $fieldsA single-dimensional indexed array of field names or a comma-separated list of field names to include. Accepts any registered form fields and'contact_type'. Default is the value of the settings option or[ 'name', 'email', 'companyName', 'contact_type', 'resume', 'message'];. Note that fields related to compliance, spam prevention, and others added by extensions will be included automatically.
array|string $requireA single-dimensional indexed array of field names or a comma-separated list of field names to require. Accepts any registered form fields and'contact_type'. Default is the value of the settings option or all default$fields.string $typeThe lead form type. Accepts'contact'and'lead'. Defaults to the value of the settings optipon.array|string $class: A space-separated string or single-dimensional indexed array of CSS class names to append to the enclosing HTML wrapper. Default is empty string.
Return
string $form A formatted string of the generated lead form based on the passed arguments.
Examples
<?php // omit opening php tag
$form = matador_get_the_bullhorn_lead_form();
<?php // omit opening php tag
$form = matador_get_the_bullhorn_lead_form( [ 'fields' => [ 'name', 'email', 'phone', 'companyName', 'contact_type', 'resume', 'message' ], 'require' => [ 'name', 'email', 'companyName', 'contact_type', 'resume', 'type' => 'lead', 'class' => 'my-theme-classname' ] );