Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Radio buttons with images- is there a way?

Avatar

Level 2

Hi, I'd like to create a radio list that is flowed horizontally (western text). Before each selection there needs to be an image. That's pretty easy to fudge through tables/subforms when you use a top to bottom flow, but in the interest of saving space on this form, they really need to be western text. Does anyone know of a way to accomplish this?

1 Accepted Solution

Avatar

Correct answer by
Level 7

Not that I can think of unless they are named the same and you set one to be global. Once you do this then they act like a radio group. One side benefit to this is that you can uncheck. Radio buttons cannot be deselected once you select one you can only change to another in that group.

View solution in original post

10 Replies

Avatar

Level 10

Hi

If the subform containing the radio button list is set to flowed and western text then the radio button list will flow horizontally, otherwise you can go into the XML Source view and change the layout attribute to layout="lr-tb".

Bruce

Avatar

Level 2

No, I wasn't asking how to flow western style, I was asking how to put an image next to each option when it is flowed western style.

In the hierarchy, the radio buttons are all in a row under their own header, and an image cannot be inserted into this list. (and if broken up, it creates 2 lists that are not mutually exclusive) - I need a list of options that are mutually exclusive AND have an image in front of each option.

Avatar

Level 7

I am not sure how you would do that with radio buttons. You can however use checkboxes and make the function like radio buttons. To do this you will need to name the check boxes all the same (i.e. Checkbox1) then you will change the On Value for each. I made mine Yes, No and Maybe. Then set the default binding to Global. The check boxes now become mutually exclusive like radio buttons. You can also change in the Object -> Field tab the appearance to be a Solid Circle to look like a radio button. Now you can place your graphic next to each check box and wrap it in a subform.

Avatar

Level 2

This sounds like it will work!

This won't effect any of my other check boxes, will it?

Avatar

Correct answer by
Level 7

Not that I can think of unless they are named the same and you set one to be global. Once you do this then they act like a radio group. One side benefit to this is that you can uncheck. Radio buttons cannot be deselected once you select one you can only change to another in that group.

Avatar

Level 10

Sorry, I understand what you meant now.  You seem to be able to add an image field into a radio button list but does give you a warning in Designer.  Seems to work OK in Reader 9.2 and 8.1 so maybe worth more testing.

Attached is a sample.  I had to move the image fields in the XML Source view.

Bruce

Avatar

Level 2

Yikes, that pdf made live cycle crash- but I did see your hierarchy before it did, and you did indeed have images in there. How did you insert them? I guess if it's giving you a warning and crashing live cycle, I should probably stick with the check boxes. Your pdf does work though, thanks

Avatar

Level 10

Hi,

I just set up an image field and then in the XML Source moved the field into the radiobutton list ... just to see what would happen. 

I didn't have any trouble with things crashing but maybe that's just because you don't have the images I used on your system.

Bruce

Avatar

Level 7

I am not sure why you would do this? Why would you play with the xml to move something where it does not really belong. This seems to me to be more of can it be done over should it be done. Am I missing something? I am just curious.

Avatar

Level 10

Hi mouslander

In this case probably not, but XFA is the standard we should be working against.  Designer is just a tool for generating XFA and there are a number of things that XFA supports that Designer does not. Adding preExecute and postExecute events, customising null handling, working with multiple datasets, using int, float, datetime form variables and having those variables at any level of the form, working with record sets, etc. As well as just being a lot faster for some changes.

Anyway I didn't find anything in the XFA spec that said you couldn't so thought I would try it.

Bruce