how do I change the button to an image in the form?

Permalink
I've went over the cod with a fine tooth comb but can I find the button reference - no.

I'm trying to alter the button to an image, has anyone else done this?

 
wagdi replied on at Permalink Reply
wagdi
Not sure if this will help but here's what I've found-

"You can load the concrete5 form helper using the following simple code"

$form = Loader::helper('form');


It says- "Concrete5's form helper makes it easy to add form widgets to your single pages and custom blocks, and several advantages to writing full HTML tags.

1. Data persistence on POST: when submitting the core form helpers, their data will remain as originally entered, without having to worry about checking $_REQUEST variables. This is even the case for more complex form elements like radio buttons and checkbox lists.

2. Attractive styling. Form elements in the block add and edit dialogs will better adhere to concrete5 design guidelines when they are output using the core form helpers.

3. Do more with less. Once you learn the syntax, writing forms using these helpers can save you a lot of time and code."

Find the rest here-http://www.concrete5.org/documentation/developers/forms/standard-wi...
kappi replied on at Permalink Reply
Thanks for the reply am trying it now
kappi replied on at Permalink Reply
Hi again, could someone please explain what the form helper does. I added it to a template page and when I select edit I see no knew options for form alterations.

Maybe I've got the wrong idea and misunderstand what the function does.
wagdi replied on at Permalink Reply
wagdi
Did you check the source for the rest of the information?

This is what it says-

You can load the concrete5 form helper using the following simple code

$form = Loader::helper('form');

The $form variable now contains an instance of the FormHelper class.

Arguments

While each form helper function ultimately displays a different HTML tag, most take common arguments. Here is their explanation:

$name
Name of the field. Oftentimes will set the ID of the field to the same value.
$value
Initial field value. Typically optional.
$tagAttributes
An associative array of additional attributes to be added to the input element. (e.g. array('style' => 'width: 100%')).
$additionalClasses
A string of additional classes to be added to the class attribute on the tag.
Optional Arguments

Note: In most cases, only the $name of the field is a required function argument. Other items are optional. Additionally, if the $value is left blank, the $tagAttributes field can usually be specified as the second argument to the helper.

Methods

$form->text($name, $value, $tagAttributes)

Creates a text input element.

print $form->text('firstName', "Andrew", array('style' => 'width: 100%', 'tabindex' => 2));



$form->submit($name, $value, $tagAttributes, $additionalClasses)

Outputs a submit button.


$form->label($name, $value)

Creates a label for a form element. The $name parameter must match the $name of another form element.


$form->hidden($name, $value)

Creates a hidden form element.


$form->password($name, $value, $tagAttribute)

Outputs a password field.


$form->checkbox($name, $value, $isChecked, $tagAttributes)

Outputs a checkbox. The $isChecked boolean controls whether the checkbox is initially checked or not.


$form->textarea($name, $value, $tagAttributes)

Outputs a textarea form element.


$form->radio($name, $buttonValue, $value, $tagAttributes)

Outputs a radio button. The $buttonValue argument controls the value of this particular radio button. The second $value argument contains the initial value we wish to check, in a series of radio buttons.


$form->select($name, $options, $value, $tagAttributes)

Outputs a select menu. The $options argument is a PHP array. The keys of the array will be used as the select option values, while the array values will be displayed in the menu. The $value parameter controls the initially checked select element.

print $form->select('favoriteFruit', array('p' => 'Pears', 'a' => 'Apples', 'o' => 'Oranges'), 'a');


In this example, the select menu will be output, with the second option selected.

SOURCE: http://www.concrete5.org/documentation/developers/forms/standard-wi...

Hope that helps.
DeWebmakers replied on at Permalink Reply
DeWebmakers
If it's just the submit button you want to be an image: this can be done with css....