How do id show a "Image Picker" based on "Choice" at "Form" Screen?

Hi,

I have a custom collection based in my “campaigns” table. I have an Add button using “Show form screen” Action.

Inside this form, i have a “choice” component, that’s has a list coming from “Method” table.

The component “Image Picker” just can be showed when the “choice” component have “Send Image” as method.

How to show and hide component at form screen if the date isn’t in yet?

Does Glider read the “choice” component in real-time?

You should be able to set a visibility condition on your Image Picker that references the selected value in your Choice component. Have you tried that?

That’s my container:

method

You would need a separate visibility condition on each image picker. Something like:

  • Image Picker (Image): Show component when Method is Image
  • Image Picker (Video): Show component when Method is Video
  • etc…

That’s means i need to have one relation for each picker?

Where are you using a relation?
Is your Choice component writing to a relation?
Whilst I know that’s possible in some circumstances, it’s not normally the way it’s used.

I think I’m missing a bit of context here. Can you show me how the Choice component is configured?

The “choice” is coming from “Method” table:

The content is:

The “choice” and picker write’s in the “campaign” table.

I have four fields, with four pickers:

Video, Audio, Image and Document

Each one write in each related field.

If you choose “Send Video” at “Method Choice”, all the pickets except “Video” need to be hide.

Yeah, I understand that.

It’s the way that your Choice component is configured that’s causing my head to spin a bit.
See here below:

You say that the Choice is coming from the Method table (which makes sense), but the way it is configured it looks as though it’s writing back to the same table (which doesn’t make sense).

I know there are some valid use cases for writing a choice selection through a single relation, but to be honest I’ve never understood them. And I don’t think this is one of them.

Can you try the following:

  • Add a column in your Campaigns table for Method, and point the Choice “Write to” at this column instead of the relation. You should then be able to specify the source (Content) as your Method table and get the same set of choices, but you can then refer to the Campaigns->Method column in your component visibility conditions and check the actual value, rather than checking for empty/not empty.