You are here

function _webform_csv_data_textfield in Webform 5.2

Same name and namespace in other branches
  1. 5 components/textfield.inc \_webform_csv_data_textfield()
  2. 6.3 components/textfield.inc \_webform_csv_data_textfield()
  3. 6.2 components/textfield.inc \_webform_csv_data_textfield()
  4. 7.4 components/textfield.inc \_webform_csv_data_textfield()
  5. 7.3 components/textfield.inc \_webform_csv_data_textfield()

Return the result of a textfield submission. The output of this function will be displayed under the "results" tab then "submissions".

Parameters

$data: An array of information containing the submission result, directly correlating to the webform_submitted_data database schema.

Return value

Textual output formatted for CSV, not including either prefixed or trailing commas.

File

components/textfield.inc, line 270
Webform module textfield component.

Code

function _webform_csv_data_textfield($data) {
  return !isset($data['value']['0']) ? '' : $data['value']['0'];
}