<p>I found the solution the values are stored in <strong>$this</strong>:</p>
<pre><code>public function normalizeValue($value, ElementInterface $element = null)
{
   $type = $this-&gt;type; 
   $shops = $this-&gt;shop;

   ...
   return;
}
</code></pre>

CC BY-SA 4.0
2022-02-23T21:26:00.463Z
2022-02-23T21:26:00.463Z
antdev
<p>It is possible to get the field settings via ElementInterface in normalizeValue Method ?</p>
<p>I need these settings of my custom field from my plugin :</p>
<p><a href="https://i.sstatic.net/lnrPk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lnrPk.png" alt="I need the type and shop value." /></a></p>
<p>how i can get now these values inside normalizeValue ?</p>
<pre><code>public function normalizeValue($value, ElementInterface $element = null)
{
    $type = $element; // Here comes the value of field settings (Type)
    $shops = $element; // Here comes the value of field settings (Shop)
    
    ...
    return;
}
</code></pre>

<plugin-development><craft-features><custom-fieldtype><custom-field>
Get field settings of custom field via ElementInterface
# Get field settings of custom field via ElementInterface

(Asked by: username_0 on 2022-02-23)

It is possible to get the field settings via ElementInterface in normalizeValue Method ?
I need these settings of my custom field from my plugin :

how i can get now these values inside normalizeValue ?
public function normalizeValue($value, ElementInterface $element = null)
{
    $type = $element; // Here comes the value of field settings (Type)
    $shops = $element; // Here comes the value of field settings (Shop)
    
    ...
    return;
}

**Tags:** plugin-development, craft-features, custom-fieldtype, custom-field

---

## 1 answers

### Answer by username_0 on 2022-02-23. Score: 3 | Accepted answer

I found the solution the values are stored in $this:
public function normalizeValue($value, ElementInterface $element = null)
{
   $type = $this->type; 
   $shops = $this->shop;

   ...
   return;
}


---

