<button type="submit"> works with images. 

On Thursday, March 28, 2013 7:52:08 PM UTC-7, Anthony wrote:
>
> The value of submit_button goes in the "value" attribute of the submit 
> <input> element, so it can only be text, not more HTML elements. If you 
> need an alternative to a standard submit button with a text label, you can 
> do:
>
> SQLFORM.factory(..., buttons=[list of one or more button elements])
>
> The standard submit button will not appear, and instead the button(s) 
> specified in the list will be placed inside a DIV().
>
> I think there are a few ways to get images in submit buttons, including 
> <input type='image' src='[image url]' name='submit' /> or specifying a 
> background image for a standard <input type='submit' ... /> button. Google 
> it.
>
> Anthony
>
> On Tuesday, March 26, 2013 3:18:32 AM UTC-4, Alec Taylor wrote:
>>
>> {{=SQLFORM.factory(submit_button=XML(SPAN('hello', 
>> IMG(_src=URL('static', 'img/bg.png')))))}} 
>>
>> How do I get this to work? 
>>
>> Thanks for all suggestions, 
>>
>> Alec Taylor 
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to