groups label got overritten by type text

Forums: 

Hi, i'm facing following problem:

I'm trying to develope a new Content Type and in my semantic.json I want to use a group and in the group I use two text types.

It does't matter if I use widgets for the text type or not. Whenever I put more than one field inside a group and one of them is a text the first text field overrides the label of the group.

 

Here my semantics.json:

[
  {
    "name": "question",
    "type": "group",
    "label": "Question",
    "fields": [
      {
        "name": "textone",
        "type": "text",
        "label": "Question Text",
        "description": "Question Text"
     
      }, {
        "name": "texttwo",
        "type": "text",
        "label": "Additional Text",
        "description": "Additional Text"
      }
      
    ]
  }
]

Am i doing something wrong or is this a bug?

Attachments: 
otacke's picture

Hi Firejunkie!

This rather is intended behavior: https://github.com/h5p/h5p-editor-php-library/blob/master/scripts/h5peditor-group.js#L131

Best,

Oliver 

Hi otacke,

thanks for your fast reply and help. I must say i don't like that behaviour. As an optional behaviour or somethink like that it would be aweresome but not as default.

Anyways thanks a lot I thought i messed up somethink with my code :D. It would be nice if souch a behaviour would apear in the docs.

Best,

Yannik

 

otacke's picture

Hi Firejunkie!

Changing that behavior and/or documenting it something that the H5P core team will have to decide upon/do. I don't have any say in this. I am merely a friendly neighborhood Spider-Man in the H5P community with too much free time ;-)

Best,
Oliver

papi Jo's picture

Hi Firejunkie,

As Oliver says, it's the intended behaviour of the h5p-editor-php-library.

For me it's a "display bug", as I explained here: https://h5p.org/node/1125222