I am using CI to create a project for a client, I have a submit button as an image but it doesn't seem to be submitting the form, the code I have at the moment is.
<input type="image" name="trialSubmit" id="trialSubmit" src="<?php echo base_url().'images/subscribe_free.jpg'; ?>" style="height:29px;width:207px;border-width:0px;" />
The code I have to use at the moment is as follows
<input type="submit" name="trialSubmit" value=" Subscribe Free " id="" class="button" />
If anyone could shed some light on why it's not working with the image, that would be tight.
Cheers,
Try adding
value="trialSubmit"
to get the image to submit. Seemed to work for me.You could also see if this answer helps: image submit button
Is it across all browsers? Or IE specific? What about if you add an onclick event just for testing?
onclick="javascript:document.formidhere.submit()"
I'd recommend using either
<input type="submit" />
or my preference would be to use<button type="submit>
due to browser inconsistencies with<input type="image" />
and just style the button with something like: