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

Required with parent type => "media"

Open FrankyG opened this issue 13 years ago • 6 comments

Hi, I just installed the latest Version 3.0.5. In sample-config.php field 'id'=>'slider1' I added "required" => array('media', 'not' , false) or "required" => array('media', 'not' , true)

So I want to show field Slider1, when an Images is selected in the field 'id'=>'media'. What happened is, that the 'media' field does not show the image nor the REMOVE button.

In my theme I want to show a spacing or dimension field only, when an image is loaded into the parent field. Maybe any of the other operators is better. I tried, but I didn't find a solution jet.

Just a small question at the end: Can I get rid of the submenus shown under APPEARANCE/CUSTOMIZE? Only a dew fields are shown there and it's kind of double.

Thanks in advance, Frank

FrankyG avatar Nov 01 '13 14:11 FrankyG

@FrankyG, you're right. There's no way, yet, for media to be the basis of required. I'll get on that.

Also I just pushed code to the repo that, by default, turns off the Appearance -> Customize fields. Sorry about that. It's a work in progress.

I'll let you know when I fix the required bit for media.

dovy avatar Nov 01 '13 17:11 dovy

That SHOULD work. Please give it a try.

dovy avatar Nov 13 '13 05:11 dovy

Hi Dovy. I just took the latest version, but I can't get it to run. I Tried it this way (in a field of type "Switch"):

            "required"   => array('my_media', '=' , 'true'),

my_media is type "media", of course. Do I have to take another operator?

FrankyG avatar Nov 14 '13 11:11 FrankyG

Sorry, I am out at my grandma's funeral. I'll get back to you on Monday.

dovy avatar Nov 15 '13 14:11 dovy

Oh, you have my sympathy. Take your time. Thats only Software here.

FrankyG avatar Nov 15 '13 14:11 FrankyG

Duplicate and merged with another issue.

dovy avatar Dec 06 '13 04:12 dovy