This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Cpt.Meatball
Whenever I want to edit one of my component's properties the first time it works correct, but the second times it turns up blank. The console logs following error:
TypeError: undefined is not a function (evaluating 'propertyValue.match(/^\{\{([^\}]+)\}\}$/)')
My guess it has to do with the checkbox
property, because it shows a >:
character, which makes me able to edit the field as if it were a string. See image below.
My property array code is:
return [
'defaultLayout' => [
'title' => 'rebel59.isogallery::lang.components.isoGallery.properties.defaultLayout.title',
'description' => 'rebel59.isogallery::lang.components.isoGallery.properties.defaultLayout.description',
'type' => 'checkbox',
'default' => '1',
],
'defaultJs' => [
'title' => 'rebel59.isogallery::lang.components.isoGallery.properties.defaultJs.title',
'description' => 'rebel59.isogallery::lang.components.isoGallery.properties.defaultJs.description',
'type' => 'checkbox',
'default' => '1',
],
'stripSource' => [
'title' => 'rebel59.isogallery::lang.components.isoGallery.properties.stripSource.title',
'description' => 'rebel59.isogallery::lang.components.isoGallery.properties.stripSource.description',
'type' => 'checkbox',
'default' => '1',
],
'isotopeSource' => [
'title' => 'rebel59.isogallery::lang.components.isoGallery.properties.isotopeSource.title',
'description' => 'rebel59.isogallery::lang.components.isoGallery.properties.isotopeSource.description',
'type' => 'checkbox',
'default' => '1',
],
'amount' => [
'title' => 'rebel59.isogallery::lang.components.isoGallery.properties.amount.title',
'description' => 'rebel59.isogallery::lang.components.isoGallery.properties.amount.description',
'type' => 'string',
'validationPattern' => '^[0-9]+$',
'validationMessage' => 'rebel59.isogallery::lang.components.isoGallery.properties.amount.title',
'default' => '0',
],
];
As default value I've tried: true
, 'true'
, 1
and '1'
. Which one's correct?
Last updated
1-1 of 1