Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Change the default values used to create a new form.
Usage
add_filter( 'frm_setup_new_form_vars', 'change_default_form' );
Parameters
- $values (array)
- $values['submit_value'] (string) Label on submit button
- $values['success_action'] (string) The action after submit. Default: message
- $values['success_msg'] (string) The default success message
- $values['show_form'] (boolean) Show form with success message
- $values['akismet'] (string) Run form submissions through Akismet
- $values['no_save'] (string) Save entries in the form
- $values['ajax_load'] (boolean) Load the form builder page with ajax
- $values['js_validate'] (boolean) Turn on javascript validation
- $values['form_class'] (string) Include a class on the form tag
- $values['custom_style'] (numeric) The id of the selected stylesheet
- $values['before_html'] (string) HTML used in the Before fields box
- $values['after_html'] (string) HTML used in the After fields box
- $values['submit_html'] (string) HTML used in the Submit button box
Examples
Change default submit button HTML
Replace the default HTML for the submit button with custom HTML.
add_filter( 'frm_setup_new_form_vars', 'change_default_form' );
function change_default_form( $values ) {
$values['submit_html'] = 'new HTML here';
return $values;
}