0

I have Added A condition on webform where submit button is enabled when on required field is filled as in below screen shot.enter image description here

But when last name or phone code is filled the field enable, sometimes on filling all fields also submit is disable. enter image description here

first_name:
  '#type': textfield
  '#title': 'First Name'
  '#placeholder': 'First name'
  '#required': true
last_name:
  '#type': textfield
  '#title': 'Last Name'
  '#placeholder': 'Last name'
  '#required': true
birthday_child_name:
  '#type': textfield
  '#title': 'Birthday Child Name'
  '#placeholder': 'Birthday child name'
  '#required': true
preferred_date_of_party:
  '#type': textfield
  '#title': 'Preferred Date of Party'
  '#placeholder': dd/mm/yyyy
  '#readonly': true
  '#required': true
  '#attributes':
    class:
      - datepicker
preferred_hour:
  '#type': select
  '#title': 'Preferred Hour'
  '#options':
    1: '1'
    2: '2'
    3: '3'
    4: '4'
  '#empty_option': Select
  '#required': true
venue:
  '#type': select
  '#title': Venue
  '#options':
    Motiongate: Motiongate
    'Very Smurfy Café': 'Very Smurfy Café'
    'Dragon Glame Grill': 'Dragon Glame Grill'
    'King Julens Café': 'King Julens Café'
    "Baby Brent's Luncheonette": "Baby Brent's Luncheonette"
    'Neon Galaxy': 'Neon Galaxy'
    'Neon Galaxy - Atlas': 'Neon Galaxy - Atlas'
    'Neon Galaxy - Orion': 'Neon Galaxy - Orion'
    'Neon Galaxy - Aurora': 'Neon Galaxy - Aurora'
    'Neon Galaxy - Comet': 'Neon Galaxy - Comet'
    'Neon Galaxy - Metor': 'Neon Galaxy - Metor'
    'The Green Planet': 'The Green Planet'
    'Learning Centre 1': 'Learning Centre 1'
    'Learning Centre 2': 'Learning Centre 2'
    'Learning Centre 3': 'Learning Centre 3'
    Riverland: Riverland
    JumpX: JumpX
    'Roxy Cinema': 'Roxy Cinema'
  '#empty_option': Select
  '#required': true
number_of_children_from_3_to_14_years_old:
  '#type': number
  '#title': 'Number of Children from 3 to 14 years old'
  '#placeholder': '0'
  '#required': true
  '#attributes':
    class:
      - disable-pluse-minus
number_of_adults:
  '#type': number
  '#title': 'Number of adults'
  '#placeholder': '0'
  '#required': true
  '#attributes':
    class:
      - disable-pluse-minus
email:
  '#type': email
  '#title': Email
  '#placeholder': 'Enter your email'
  '#required': true
  '#pattern': '[\w+-]+(?:\.[\w+-]+)*@[\w+-]+(?:\.[\w+-]+)*(?:\.[a-zA-Z]{2,4})'
  '#default_value': '[current-user:mail]'
container:
  '#type': container
  '#attributes':
    class:
      - phone-section
  country_code:
    '#type': select
    '#title': 'Country Code'
    '#options': country_phone_code
    '#required': true
  phone_number:
    '#type': tel
    '#title': 'Phone Number'
    '#placeholder': 'Enter your phone number'
    '#required': true
interested_in:
  '#type': checkboxes
  '#title': 'Interested in'
  '#options':
    'Furniture Rental': 'Furniture Rental'
    Audio-Visuals: Audio-Visuals
    Photographer: Photographer
    'Food & Beverage': 'Food & Beverage'
    'Entertainment Services': 'Entertainment Services'
    'Themed Decor': 'Themed Decor'
    'Gift Favors': 'Gift Favors'
    Mascot: Mascot
    Cake: Cake
    'Invitation cards': 'Invitation cards'
actions:
  '#type': webform_actions
  '#title': 'Submit button(s)'
3
  • Provide the YAML of a minimal form that displays the problem. Also, I am not certain what you are asking. Some of the English is not understandable.
    – mona lisa
    Commented Feb 12 at 11:37
  • added meta data for webform
    – Z CHAMP
    Commented Feb 12 at 12:12
  • There are no conditions in the code sample.
    – mona lisa
    Commented Feb 12 at 12:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.