[TYPO3-project-formidable] Image inside a button

Luc Muller l.mul-nospam-ler at ameos.com
Mon Jul 21 10:34:31 CEST 2008


Hi Mack

I'm not sure this is want you're attending.

using a link with a runat server will perform task while clicking on the 
link, and not submitting the formular.

You can either try this :

<renderlet:IMAGE name="btnsubmit">
  <path>Path to your image</path>
  <style>cursor: pointer</style>
  <onclick>
    <submit />
  </onclick>
</renderlet:IMAGE>

For now, if you do not want to use Javascript for submitting the form 
you can simply use a normal submit renderlet and add you own CSS class

<renderlet:SUBMIT>
    <label>Submit</label>
    <class>MyCustomSubmit</class>
</renderlet:SUBMIT>

This should work also.

Hope this help

Luc

Loredana ZECA a écrit :
>
> Hy,
>
> Instead, you can try something like this:
>
> <renderlet:LINK name="myName" class="myClass">
>     <label><![CDATA[
>         <img src="myImage.png"/>New
>     ]]></label>
>     <onclick runat="server">
>         ....
>     </onclick>
> </renderlet:LINK>
>
>
> Hope this helps you.
>
> Regards,
> Loredana Zeca
>
>
> Mack Sol a écrit :
>> Hello,
>>
>> I'm using formidable and I need your help. That's why I really hope 
>> you can help me.
>>
>> I want to do this HTML code:
>> <div class="buttons">
>>   <button type="submit" name="myName" class="myClass">
>>     <img src="myImage.png"/>New
>>   </button>
>> </div>
>>
>> Initially my code was:
>> <renderlet:SUBMIT name="myName" label="New" mode="clear">
>>
>> So I try this code in my XML file but that's not working:
>> <renderlet:BUTTON name="myName" label="New" mode="clear">
>>   <custom>class="positive"</custom>
>>   <childs>
>>     <child>
>>       <renderlet:IMAGE name="submit">
>>         <path>EXT:myImage.png</path>
>>         <onclick>
>>           <submit />
>>        </onclick>
>>      </renderlet:IMAGE>
>>    </child>
>>   </childs>
>>   <wrap><![CDATA[
>>     <div class="buttons">|</div>     ]]>
>>   </wrap>
>> </renderlet:BUTTON>
>>
>> I obtain this HTML code:
>> <div class="buttons">
>>   <input type="button" name="userform[myName]" id="userform_myName" 
>> value="New" class="positive" />
>> </div>
>>
>> It's not what I want and I don't know how to solve the problem. Any 
>> help would be much appreciated. By the way, thanks for the great work 
>> on Formidable. It's quite difficult for beginner like me but very 
>> powerful!
>>
>> Best regards.
>>
>>
>> _________________________________________________________________
>> Contrôlez les personnes autorisées à parler à vos enfants sur  MSN / 
>> Windows Live Messenger !
>> http://www.windowslive.fr/controleparental/default.asp


-- 

*Luc Muller*
/Web Developper/
/Formidable - Rapid Application Developpement Framework for Typo3 
<http://formidable.typo3.ug>/
/Typo3 Ameos <http://www.ameos.com>/



More information about the TYPO3-project-formidable mailing list