JSFiddle - React, Tailwind, and code Playground

by wisegorilla

JavaScript

if (isset($cf7_variables['first-name'])) {
      $merge_variables['FNAME'] = filter_var($cf7_variables['first-name'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['last-name'])) {
      $merge_variables['LNAME'] = filter_var($cf7_variables['last-name'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['country-name'])) {
      $merge_variables['COUNTRY'] = filter_var($cf7_variables['country-name'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['Interest'])) {
      $merge_variables['INTEREST'] = filter_var($cf7_variables['Interest'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['Subscribe-Source'])) {
      $merge_variables['SOURCE'] = filter_var($cf7_variables['Subscribe-Source'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['New-Subscriber'])) {
      $merge_variables['NEWSUBSCR'] = filter_var($cf7_variables['New-Subscriber'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['language'])) {
      $merge_variables['LANGUAGE'] = filter_var($cf7_variables['language'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['Newsletter']) && (string) $cf7_variables['Newsletter'] === '1') {
      $merge_variables['NEWSLETTER'] = filter_var($cf7_variables['Newsletter'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['channel'])) {
      $merge_variables['CHANNEL'] = filter_var($cf7_variables['channel'], FILTER_SANITIZE_STRING);
    }

    if (isset($cf7_variables['title'])) {
      $merge_variables['TITLE'] = filter_var($cf7_variables['title'], FILTER_SANITIZE_STRING);
    }
    return $merge_variables;