Conditional Fields

I was looking for something like conditional fields, where a field is shown if another field has a certain value. I found a Restack docs page explaining how it should work, but since I’m not sure whether that is outdated or not even related to the official Strapi docs I’m asking on here. Is this even possible or is it planned for a future RC?

Currently I tried something like the example below, but it’s not working and always showing the “conditional” field.

{
  "kind": "collectionType",
  "collectionName": "articles",
  "attributes": {
    "title": {
      "type": "string"
    },
    "hasSummary": {
      "type": "boolean"
    },
    "summary": {
      "type": "text",
      "conditional": "hasSummary"
    }
  }
}

This topic has been created from a Discord post (1222548787512479754) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

Strapi dont have that functionality from the box. Read article fully please.

Hello <@691710226122145805> ,
Same here i am new on strapi, but stuck on coditional logic for fields in strapi,
Where i have to put the code, like how i can achieve this,

Ex. I have Collection type “post”, it having the field “date” and “sector”, sector is enumeration data type and has values like morning and noon
So i want that if we select morning then “date” field should be hide, while create entry in post collection.

I have tried with lifecycyles.json but nothing is effected the path like
src/api/post/content-types/post/lifecycles.js

module.exports = {
beforeCreate: async (entry) => {
if (entry.sector === ‘morning’) {
delete entry.date;
}
}
};
Please help out me for this issue.

Thanks in advanced.

That restack website is absolutely trash. It’s some auto generated website which contains incorrect info.
Like Shadow says; conditional fields is not yet a feature in Strapi. It’s on the backlog though.