redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Change Default Values On Condition

Open mstoic opened this issue 11 years ago • 3 comments

Is it possible to change the default value of a field on condition. I mean using required or something.

mstoic avatar May 27 '15 14:05 mstoic

You can use a filter I suppose...

dovy avatar May 27 '15 15:05 dovy

Sorry, but I Didn't understood.

Let me tell you the scenario.

I have an image select field with 5 image options. I have set the first image as default. I also have a color scheme field with 5 possible options. Now I want to change the default value for the image select field, whenever the user switches the color scheme.

Any documentation/code example will be really helpful.

mstoic avatar May 27 '15 15:05 mstoic

I'm saying we don't really have that functionality. We have the color schemes extension, but it doesn't exactly do what you're asking to do.

The only thing you could do is a filter on save, and if that field is changed update the values accordingly.

It would just be too difficult for us to build that into the framework. It's something you need to do on your own. Best of luck!

dovy avatar May 27 '15 16:05 dovy