Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions

Image for Form Submit buttons and general form output


Reply

3 Posts   2884 Views

Avatar
Searly

10 February 2009 at 1:03pm Community Member, 11 Posts

Hi there,

just wondered if somebody can give me a hint as to how i can control the form xhtml output, for example for hte search form.
I would like to use an <input ... element of hte type="image" do i can customise the search form.

i followed the tutorial here http://doc.silverstripe.com/doku.php?id=tutorial:4-site-search

however i can't seem to find anywhere how to control form output ... Thanks.

Avatar
dio5

11 February 2009 at 9:26am Community Member, 501 Posts

Hi,

If you want to use an image type submit button, you'll need to find the line in Page_Controller where it creates a new 'FormAction' and replace it by an ImageFormAction.

You can find the docs for ImageFormAction here: http://api.silverstripe.com/forms/actions/ImageFormAction.html

Hope this was helpful.

Avatar
Searly

11 February 2009 at 12:07pm Community Member, 11 Posts

That is exaclty what i was looing for ... Thank you ...