They are photosynthetic but some will take food depending on the type of mushroom.
Frilly's will often eat regularly if the food is offered to them. You can feed anything marine and meaty as long as it's small enough for them to fit it into their mouths. I can't say I have ever noticed the discosoma sp. eating.