Someone was asking if Actinic allowed images on Choices. The answer was that it isn't built-in. However it's now really easy in V8 to extend Actinic to do just that.
Adding an optional image to each Radio Button Choice.
In Design / Library / Variables, right click Library and select New Variable.
Make the following settings:
OK out.
Go to Design / Library / Layouts / Choices
Double-click Radio Button Choice and replace all the code with the following
OK out and that's it.
Your Choice Details dialogue should now have a new entry Choices / Image, where you can browse for an image to add to this choice.
Adding an optional image to each Radio Button Choice.
In Design / Library / Variables, right click Library and select New Variable.
Make the following settings:
Code:
Name ChoiceImage Description An image to use with this choice. Prompt Image Group Choice Place of Setting Choice Allow <Use Parent>... Unchecked Tab Name General Type Filename Allow Empty Value Checked Initial Value <blank> Top Level Value <blank>
Go to Design / Library / Layouts / Choices
Double-click Radio Button Choice and replace all the code with the following
Code:
<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"/><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>
Your Choice Details dialogue should now have a new entry Choices / Image, where you can browse for an image to add to this choice.
Comment