You are here

public static function Helper::print_form in Anti Spam by CleanTalk 8.3

* Print html form for external forms() *

Return value

string

File

src/lib/Cleantalk/Common/Helper.php, line 622

Class

Helper
Cleantalk's hepler class

Namespace

Drupal\cleantalk\lib\Cleantalk\Common

Code

public static function print_form($arr, $k) {
  foreach ($arr as $key => $value) {
    if (!is_array($value)) {
      if ($k == '') {
        print '<textarea name="' . $key . '" style="display:none;">' . htmlspecialchars($value) . '</textarea>';
      }
      else {
        print '<textarea name="' . $k . '[' . $key . ']" style="display:none;">' . htmlspecialchars($value) . '</textarea>';
      }
    }
  }
}