I can create the regular submit button in the form api but what if I want to do something like this
$form['required_text'] = array(
'#markup' => '<button name="submit" value="submit" type="submit" class="primary-submit submit" id="edit-submit">Submit - markup
<img src="/img/arrow.png">
</button>',
);
This does not send the form. What do I need to do or does it need to be an input field?
You might wahnt to use an image_button
type instead. Also at the moment you're not really using the form API properly, you can just add markup to the form like you're doing but it doesn't register the element in the form and thus won't run submit/validate handlers. Something like this would work:
$form['required_text'] = array(
'#type' => 'image_button',
'#value' => 'submit',
'#src' => '/img/arrow.png'
);
With that element you'll get a an <input type="image" />
with the correct image loaded in to it's source.
Hope that helps