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.
This hook can be used to add anything, such as a field, to a form. By default, any additions will not be saved with the form entry.
Usage
add_action('frm_entry_form', 'add_hidden_field'); function add_hidden_field( $form, $form_action, $errors )
Parameters
- $form (object)
- $form_action (string) create or update
- $errors (array)
Examples
Add Hidden Field
The example below will allow you to add a hidden field to your form while customizing the field name and field value.
add_action('frm_entry_form', 'add_hidden_field');
function add_hidden_field( $form ){
echo '<input type="hidden" name="my_field_name" value="my_field_value">';
}