[eluser]imn.codeartist[/eluser]
[quote author="pallavi312" date="1263381965"]hello,
i have button image. i want to able able to put that image as button in form. i have used form_image like this in helpr.
function form_image($data = '', $src = '', $alt='', $extra = '', $val='', $id='')
{
$defaults = array('type' => 'image', 'name' => (( ! is_array($data)) ? $data : ''), 'src' => $src, 'alt' => $alt, 'value' => $val, 'id' => $id);
return "<input "._parse_form_attributes($data, $defaults).$extra." />";
in controller
$manage_data['form_elem'] = array("submit"=>array("name"=>"submit","id"=>"submit","src" => base_url()."images/action_page_update.jpg","value"=>"Submit", "onclick"=>"return confirmupdate(this)")
in view
<?=form_image($form_elem['submit'])?>
when i click on that image button my form get submitted . i want this image only as button type not submit type.
how to do this?[/quote]
Create your own helper ... simple