[TYPO3-project-formidable] New renderlet SUBMITIMAGE

Luc Muller l.mul-nospam-ler at ameos.com
Tue Aug 7 10:39:39 CEST 2007


Hi Rego.

Thanks for acting in the community and submitting your works :)
It make use Happy to see that peoples are involved in the development of 
FORMidable.

I think that having a image button to submit the form is great. but the bast 
way to have it should be inside the submit renderlet itself.
I mean. If I add a <image> tag at the submit renderlet, then it should be 
replaced by the image and not the submit button.
I don't really know if it's a good idea to have many renderlets that are 
making the same things.

Well in a another way you couldn't you have done something like this :

  <renderlet:IMAGE name="submit">
       <path>EXT:Yourext/res/images/submit.gif</path>
       <custom>style="cursor: pointer;"</custom>
       <onclick>
            <submit />
       </onclick>
  </renderlet:IMAGE>

this is the kind of renderlet we use when we need to have a image to submit 
forms.

Thanks a lot :)

"Manuel Rego Casasnovas" <mrego at igalia.com> a écrit dans le message de news: 
mailman.369.1186475317.14781.typo3-project-formidable at lists.netfielders.de...
>
> Hello everyone,
>
> in my company we need to use an input image instead of a submit button.
>
>
> We've developed the next class:
>
> class tx_rdtsubmitimage extends tx_rdtsubmit {
>
>    function _render() {
>
>        $sLabel = $this->oForm->_getLLLabel($this->aElement["label"]);
>
>        if(!($path = $this->oForm->_navConf("/path", $this->aElement))) {
>           $this->oForm->mayday('Path for SUBMITIMAGE renderlet is
> required');
>        }
>
>        $sInput = "<input type=\"image\" src=\"" . $path . "\" name=\""
> . $this->_getElementHtmlName() . "\" id=\"" . $this->_getElementHtmlId()
> . "\" value=\"" . $sLabel . "\"" . $this->_getAddInputParams() . " />";
>
>        $aHtmlBag = array(
>            "__compiled" =>
> $this->oForm->oRenderer->_displayLabel($sLabel) . $sInput,
>            "input" => $sInput,
>        );
>
>        return $aHtmlBag;
>    }
>
> }
>
> if (defined("TYPO3_MODE") &&
> $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/ameos_formidable/api/base/rdt_submitimage/api/class.tx_rdtsubmitimage.php"])
> {
>
> include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/ameos_formidable/api/base/rdt_submitimage/api/class.tx_rdtsubmitimage.php"]);
> }
>
>
> Line to add in the ext_localconf.php file:
>
> "SUBMITIMAGE"        => array("key" => "rdt_submitimage",
> "base" => TRUE),
>
>
> Example:
>
>   <renderlet:SUBMITIMAGE name="btnsearch" label="Search">
>      <path>fileadmin/img/search.png</path>
>      <custom>class="search"</custom>
>   </renderlet:SUBMITIMAGE>
>
>
> I think that you can add this new renderlet to Ameos FORMidable.
>
>
> Best regards,
>   Rego
>
> -- 
> Manuel Rego Casasnovas
> Computer Science Engineer
> mailto:mrego at igalia.com
> Tel: +34 986 10 76 10
> Fax: +34 981 91 39 49
> Igalia - http://www.igalia.com 




More information about the TYPO3-project-formidable mailing list