Skip to content

Commit

Permalink
fix: If label is intentionally blank or label is not enabled we fallb…
Browse files Browse the repository at this point in the history
…ack to 'type: name' for the control label to ensure a value is visible on the stage
  • Loading branch information
lucasnetau committed Nov 4, 2023
1 parent 612d009 commit fcff9e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/form-builder.js
Expand Up @@ -1010,8 +1010,8 @@ function FormBuilder(opts, element, $) {

const type = values.type || 'text'
let label = values.label || (isNew ? i18n[type] || mi18n.get('label') : '')
if (type === 'hidden') {
label = `${mi18n.get(type)}: ${values.name}`
if (type === 'hidden' || label === '') {
label = `${mi18n.get(type) ?? type}: ${values.name}`
}
const disabledFieldButtons = opts.disabledFieldButtons[type] || values.disabledFieldButtons
let fieldButtons = [
Expand Down

0 comments on commit fcff9e9

Please sign in to comment.