Creating 2 radio groups in on Radio Alert


#1

Hi,

Is it possible to create 2 separate radio groups in a Radio Alert prompt? Or is it restricted to 1?

Or is it possible to create a custom content area within the Alert component?

Thanks,

Chris


#2

We’ve limited it to one.

If you want multiple groups, it’s best to create multiple options.

An alert should really only have a single focus


#3

@mhartington thanks for your response.

I noticed on the docs it says use a modal if we would like more custom content.

This is a good option for phones, however we are developing on tablets and eventually desktop so a modal is too large. We found a way to inject html into an alert through the subtitle option but it is a not the Ionic way and perhaps we’ll run into issues later.

The way I see it there are 3 options:

  • use a modal with custom content (html) and change the styling to imitate an alert
  • use an alert with the html injected through the subtitle property
  • use a component that Ionic are bringing out in the future that is more suitable

Which is the best option?

Thanks,

Chris


#4

@ChrisGrigg IMHO this one is your best bet, see the following topic for more details: