[TYPO3-project-formidable] CAPTCHA: HowTo Remove <br>-tags between Input and reload Image

Luc Muller "l.muller[no]" at [spam]ameos.com
Wed Feb 25 08:51:45 CET 2009


 > Can you tell me what the copylabel actually is? It seems to me that it
 > does not have any use.

It's something where you can write some instruction for the captcha. 
such as (please copy the code in the input, do care about case sensitiv...)

to me, it should be placed after the image and not with the label.

this way you can use captcha like this :

<renderlet:CAPTCHA name="captcha" label="captcha" copylabel="Please copy 
the code you see in the input right below" />

and use this template structure :

<p>{captcha.label}</p>
<p>{captcha.image}{captcha.reload}</p>
<p>{captcha.copylabel}</p>
<p>{captcha.input}</p>

you'll got label > image > reload > instruction > input

may this will help you :
http://formidable.typo3.ug/typo3-form-news/news/0011-how-to-configure-the-captcha-renderlet/back/2.html

and there you got the whole reference of everything is possible within 
the captcha.

http://formidable.typo3.ug/reference/elements/renderletcaptcha.html

Hope this helps and thanks for the small patches :)

Luc =:0)


Hauke Hain a écrit :
> Hi Luc,
> 
> I found out that there is such a helpful template engine very late.
> I just reworked my whole XML and I am using a template now.
> I did not find out how I set childs, so I removed the parent.
> Now I dont have the <br/<-Tags anymore. (I want the input next to the 
> images.)
> 
> I find a bug: {captcha.label}: The output is only the text of the label 
> , not the whole label as in other renderlets.
> Solution:
> Replace
> "label" => $this->oForm->_getLLLabel($this->aElement["label"]),
> With
> "label" => $sLabel,
> 
> Can you tell me what the copylabel actually is? It seems to me that it 
> does not have any use.
> 
> Regards,
> Hauke
> 
> "Luc Muller" <"l.muller[no]"@[spam]ameos.com> schrieb im Newsbeitrag 
> news:mailman.1.1235495515.14830.typo3-project-formidable at lists.netfielders.de... 
> 
>> Your idea is correct.
>>
>> making the display in full CSS.
>>
>> but I can't do :
>>
>> > In Line 83 you have to add these lines, so that the function is the 
>> same
>> > (if $sCopy has a value the <br>-Tags are set, otherwise they aren't):
>> >    if ($sCopy) {
>> >      $sCopy = "<br/>".$sCopy."<br/>";
>> >    }
>>
>> as <br /> are going to be rendered in template mode.
>>
>> see htmlbag=>copylabel
>>
>> $aHtmlBag = array(
>> "__compiled" => $sLabel .$aCaptcha["img"].$aCaptcha["reload"]."<br 
>> />".$sCopy."<br />". $sInput,
>> "label" => $this->oForm->_getLLLabel($this->aElement["label"]),
>> "image"=>$aCaptcha["img"],
>> "reload"=>$aCaptcha["reload"],
>> "copylabel"=>$sCopy,
>> "input" => $sInput,
>> );
>>
>> I think that __compiled, should not be used in template mode.
>> You'd better make your custom html structure and explode your captcha 
>> element using the template engine.
>>
>> basiccaly, if I used <br />
>>
>> it's to have the possibily to write something like this in the template :
>>
>> <p>{firstfield}</p>
>> <p>{secondfield}</p>
>> <p>{captcha}</p>
>> <p>{submit}</p>
>>
>> as this html should remain w3c valid, it can only be with <br /> or 
>> <span> or other inline tags in the compiled.
>>
>> from this, the only tag I can add to have line break without using 
>> specific css style is a <br />.
>>
>> I Don't know if you got another idea for this ?
>>
>> I'll appreciate any point of you :)
>>
>> thanks a lot
>>
>> Luc Muller =:0)
>>
>>


More information about the TYPO3-project-formidable mailing list