Answers.Body: <p>Rendering Twig in the &quot;Selectable Entries Condition&quot; field setting isn't actually possible, but <a href="https://github.com/craftcms/cms/pull/12679" rel="nofollow noreferrer">it will be in the upcoming Craft 4.4 release</a>, which as of writing this (march 1st 2023) is due out in a few weeks.</p>
  <p>To install the 4.4 beta, change your <code>craftcms/cms</code> requirement in your <code>composer.json</code> file to:</p>
  <p><code>^4.4.0-beta.1</code></p>
  <p>...and then run <code>composer update</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-01T22:14:46.623Z
Answers.LastActivityDate: 2023-03-01T22:14:46.623Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Body: <p>In the Craft CMS admin, I have an entries field on a page, and I want to limit the selectable entries available to only the child pages of the current entry.</p>
  <p>To achieve this, I set the <code>Selectable Entries Condition</code> in the field's settings to only allow entries to be selected if they match the following rules: <code>URI contains {{entry.slug}}</code> (section type is structure and URI format is {parent.uri}/{slug}). I have multiple level one pages with the same entry type in the structure so narrowing the child pages by entry type/level/section isn't an option.</p>
  <p>The issue I'm running into is that the field doesn't seem to recognize the twig variable, and the restriction is not applied as intended. How do you add dynamic content to the conditional field in Craft?</p>
  
Tags: <conditional><entries-field><craft4>
Title: Parent based Selectable Entries Condition
ThreadText: # Parent based Selectable Entries Condition
  
  (Asked by: username_0 on 2023-03-01)
  
  In the Craft CMS admin, I have an entries field on a page, and I want to limit the selectable entries available to only the child pages of the current entry.
  
  To achieve this, I set the `Selectable Entries Condition` in the field's settings to only allow entries to be selected if they match the following rules: `URI contains {{entry.slug}}` (section type is structure and URI format is {parent.uri}/{slug}). I have multiple level one pages with the same entry type in the structure so narrowing the child pages by entry type/level/section isn't an option.
  
  The issue I'm running into is that the field doesn't seem to recognize the twig variable, and the restriction is not applied as intended. How do you add dynamic content to the conditional field in Craft?
  
  **Tags:** conditional, entries-field, craft4
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-03-01. Score: 4 | Accepted answer
  
  Rendering Twig in the "Selectable Entries Condition" field setting isn't actually possible, but [it will be in the upcoming Craft 4.4 release](https://github.com/craftcms/cms/pull/12679), which as of writing this (march 1st 2023) is due out in a few weeks.
  
  To install the 4.4 beta, change your `craftcms/cms` requirement in your `composer.json` file to:
  
  `^4.4.0-beta.1`
  
  ...and then run `composer update`.
  
  
  ---
  
  