$value) { if ($field == 'body') { $this->guy->fillField('textarea[name="ContactForm[' . $field . ']"]', $value); } else { $this->guy->fillField('input[name="ContactForm[' . $field .']"]', $value); } } $this->guy->click('Submit','#contact-form'); } }