when i added a second element type "buttons" the form display change (2nd screen)

the 1er screnn is before adding the second element which type is buttons

Comments

imen ch created an issue. See original summary.

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new65.17 KB

I can't reproduce this issue locally using the latest dev release.

Below are the elements that I am using...

radios:
  '#type': radios
  '#title': radios
  '#options': days
buttons:
  '#type': buttons
  '#title': buttons
  '#options': days

imen ch’s picture

StatusFileSize
new24.28 KB

the module i installed is webform Version: 8.x-5.0-beta7
the problem is when i added other type buttons , for the first button i have no problem
here is the screen without the second type button

imen ch’s picture

I tested on webform version 8.x-5.0-beta4, there are no problems for this version.

jrockowitz’s picture

@imen ch

I can't duplicate the issue.

Below is the code I am using.

radios:
  '#type': radios_other
  '#title': radios
  '#options': days
buttons:
  '#type': buttons
  '#title': buttons
  '#options': days
buttons_other:
  '#type': buttons_other
  '#title': buttons
  '#options': days

Please upload some example code that fully documents the exact the issue.

imen ch’s picture

StatusFileSize
new23.25 KB
new8.85 KB

i have no problem with the first element type 'button', but when i add an other element type button, i have problem on display of ther elements!
PS:
candidature5.png screen with one element type button,
candidature6.png screeen with 2 element type button

I haven't this problem with Webform version : 8.x-5.0-beta4

code for the first element type button:
webform_buttons:
'#type': buttons
'#title': 'Civilité :'
'#options':
Mme: Madame
Mr: Monsieur
'#required': true

code for the first element type button:
dispo:
'#type': buttons
'#title': dispo
'#options':
un: un
deux: deux
trois: trois

when i changed the code : webform_buttons: instead of dispo:, it becomes webform_buttons: null

jrockowitz’s picture

You have make sure I can duplicate the issue so that I can fix it.

Please wrap your example in code tags so that the indentation is maintained.

  • jrockowitz committed e39be47 on 2856741-buttons
    Issue #2856741 by imen ch, jrockowitz: add element type "buttons"
    
jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new2.4 KB

I was finally able to duplicate the problem by going to the Element Examples (/form/example-elements).

Please test the attached patch.

  • jrockowitz committed db35529 on 8.x-5.x
    Issue #2856741 by jrockowitz, imen ch: add element type "buttons"
    
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.