Text Control Default

Text control - I have this for properties:
I’m wondering why the default text is not showing up?

{
“groups”: [{
“title” : “Group Name1”,
“icon”: “textformat.size”,
“properties”: [
{“title”: “Title:”,
“property”: “title”,
“text”: {
“default”: “Hi”,
“subtitle”: “A subtitle”
}
}
]
}]
}

I copied the text property straight from the manual and this did not show, might be my misunderstanding

although I have just got some text property to work

I’ve just taken a look at the manual and it was missing a comma on line 10 after “Hello World”

Here’s the working code and I’ve updated the manual.

{
    "groups": [        
      {
        "title" : "Text Field Example",
        "properties" : [
            {
                "title": "Text Field",
                "property": "MyTextField",
                "text" : {
                    "default" : "Hello World",
                    "subtitle" : "one",
                }
            }
      ],
    }]
    
}

@dan If you look closely in your screen shot, you will see that the default ‘Hello World’ is not being placed in the original control.

It’s because it’s just been created, If you drop in a fresh copy of the Component, the default text works.

2 Likes