Announcement

Collapse
No announcement yet.

ALT tags in Choice Radio Button Images

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ALT tags in Choice Radio Button Images

    Hi,

    I have been trying to find a way to add ALT Tags to the images in the Choice Radio Button Images.

    I've been looking around and think i could add the code somewhere in the 'Radio Button Choice' layout.

    Only I'm not sure exactly where and what code to add. Ideally I'd like the ALT tag to use the Choice Name.

    Here is the code that i currently have in the 'Radio Button Choice' layout:

    <actinic:block php="true">
    $choiceimage = '<Actinic:Variable Name="ChoiceImage" encoding="perl"
    selectable="false" />';
    if ( $choiceimage )
    {
    list($width, $height, $type, $attr) = getimagesize($choiceimage);
    if ( $width )
    {
    echo " <img src=\"$choiceimage\" width=\"$width\"
    height=\"$height\" />";
    }
    else
    {
    echo "<font color=\"red\"><b> BAD IMAGE</b></font>";
    }
    }
    </actinic:block>
    <input type="radio" name="<Actinic:Variable Name="UIWidgetName"/>"
    value="<Actinic:Variable Name="ChoiceSelectedValue"/>"<actinic:block
    if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201">checked=
    "checked"</actinic:block> />
    <Actinic:Variable Name="ChoiceDisplayLabel"/>



    Any help would be much appreciated.

    #2
    That's an Advanced Guide tweak. Try this:

    Amend the line:
    Code:
    height=\"$height\" />";
    To be:
    Code:
    height=\"$height\"
    alt=\"<actinic:variable encoding="strip" name="ChoiceName" selectable="false" />\"
    title=\"<actinic:variable encoding="strip" name="ChoiceName" selectable="false" />\" />";
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Excellent, this has worked perfectly!

      Thanks very much for your help.

      Comment

      Working...
      X