This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi
I'm having a little problem trying to pull out the values of the properties set within function defineProperties() in my component.
I have added some property values when including two instances of the plugin on a page. This is a short list of the properties to provide some context to my issue.
defineProperties() { return [ 'title' => [ 'title' => 'Title' ], 'type' => [ 'title' => 'Type', 'type' => 'dropdown', 'default' => 'standalone', 'placeholder' => 'Select type', 'options' => ['standalone'=>'Standalone', 'networked'=>'Networked'] ], 'unitCost' => [ 'title' => 'Unit Cost', 'default' => '130.00', ] ...
The properties are set as:
Instance 1: form Component Alias: standalone Title: Type: Standalone Unit Cost: 5.00
Instance 2: form Component Alias: standalone Title: Type: Standalone Unit Cost: 5.00
The above have been appended to the /plans page
The plugins components/form/default.html contains the following (both instances use this directly i.e. not forked)
`
`The above statement {{ SELF }} produces the reference for both user entered Alias values. When I try to access other properties on SELF such as {{ SELF.alias }} and {{ SELF.id }} these hold the relevant details. It is only when I try to access the custom properties below I get nothing but blanks:
{{ SELF.type }} - blank
{{ SELF.unitCost }} - blank
Can anyone help?
Last updated
1-2 of 2