protected function onShortcode($content, $code, \Drone\HTML &$html) { $html->add(\Everything::contactForm(function ($field, $required, $label) { $input = HTML::p(); if ($field == 'message') { $input->addNew('textarea')->name($field)->placeholder(strtolower($label)); } else { if ($field == 'captcha') { $input->add('%s'); } else { if ($required) { $label .= '*'; } $input->addNew('input')->type('text')->name($field)->placeholder(strtolower($label)); } } return $input->html(); }, '', sprintf('<p><input type="submit" value="%s ›" /><i class="icon-arrows-ccw load"></i><span class="msg small"></span></p>', __('Send', 'everything')), true)); }