[html-formfu] Adding a static image block

Carl Franks fireartist at gmail.com
Fri Jun 22 15:38:15 GMT 2007


On 18/06/07, Alan Hicks <ahicks at p-o.co.uk> wrote:
> Is there a best practice to add a static image to a form that is
> accessible at runtime?
>
> The image is a captcha image and needs to have the src attribute added
> at runtime since the location changes depending on the referrer.
>
> The yaml extract is as follows
>
>    - type: block
>      id: captcha_image
>      tag: img
>
> If the yaml file contains attributes_xml: {src:
> http://localhost:3000/feedback/captcha} all works ok with the rendered
> tag as <img id="captcha_image"
> src="http://localhost:3000/feedback/captcha"></img>
>
> As the block does not appear to have a name tag I don't seem able to
> find it easily with get_element().

Sorry it's taken a while - I somehow archived this, without even
seeing it arrive in my inbox!

All elements inherit a name() method from HTML::FormFu::Element, so
even if it's not used in the rendering, so you can still assign a name
for just this purpose.

Carl



More information about the HTML-FormFu mailing list