# fluentform/3.6.62/app/Services/Integrations/LogResponseTrait.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 3.6.62. 33 lines.

- Page: https://pluginprobe.com/plugins/fluentform/3.6.62/code/app/Services/Integrations/LogResponseTrait.php
- Raw: https://pluginprobe.com/plugins/fluentform/3.6.62/raw/app/Services/Integrations/LogResponseTrait.php
- Modified: 2018-06-28T15:49:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluentform/3.6.62/code/app/Services/Integrations/LogResponseTrait.php#L10-L20`.

```php
<?php

namespace FluentForm\App\Services\Integrations;

trait LogResponseTrait
{
	protected function logResponse($response, $feed, $data, $form, $entryId, $status)
	{
		if (!$response) return;

		$prefix = 'fluentform_after_submission_api_response_';
		$action = $prefix . $status;

		do_action(
			$action,
			$form,
			$entryId,
			$data,
			$feed,
			$response,
			$this->getApiResponseMessage($response, $status)
		);
	}

	protected function getApiResponseMessage($response, $status)
	{
		if (is_array($response) && isset($response['message'])) {
			return $response['message'];
		}
		
		return $status;
	}
}
```
