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 for altering the message/response when an XML file is imported.
Usage
add_filter( 'frm_xml_response', 'change_response_message' );
Parameters
- $response (array)
- $form (array)
- $imported (array)
Examples
Change property
This example will change the name property of a field
add_filter( 'frm_xml_response', 'change_response_message' );
function change_response_message( $response ) {
$form_id = '123';
if ( $response['id'] === $form_id ) {
$response['message'] = 'new message';
}
return $response;
}
Replace the value of variable $form_id with the id of the form you need to catch