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
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.

http://i46.photobucket.com/albums/f136/CptMeatball/Screen%20Shot%202015-09-10%20at%2018.44.36_zpsuedb9ypx.png

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

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.