3
module.exports = {
    extend: 'apostrophe-widgets',
    label: 'Learn More',
    instructions: 'Learn More Widgets',
    addFields: [
        {
            name: 'learnMore',
            type: 'string',
            label: 'Name for the Link',
            required: false,
        },

    ]
};

How can we set the default value.

Nick is tired
  • 6,860
  • 20
  • 39
  • 51
Grewal
  • 55
  • 6

1 Answers1

3

I'm the lead developer of Apostrophe at P'unk Avenue.

Just use the def property:

{
  name: 'learnMore',
  type: 'string',
  label: 'Name for the Link',
  required: false,
  def: 'Learn More'
}
Tom Boutell
  • 7,281
  • 1
  • 26
  • 23