Support

Account

Home Forums General Issues Looking for numeric field type documentation Reply To: Looking for numeric field type documentation

  • Hi,
    after reading some posts about input type number I tested different browsers and settings with a simple html form.

    1. Setting 1:
      • lang attribute of the body set to de-DE
      • lang attribute of input field #1 set to de-DE
      • lang attribute of input field #2 set to en-US
      • step attribute set to 0.001 in both input fields
      • Results: Chrome indifferent to input with decimal point or comma. Firefox sensitive to inputs in field #1 (requires decimal comma), indifferent to inputs in field #2.
    2. Setting 2:
      • lang attribute of the body set to de-DE
      • no lang attribute set on the input fields
      • step attribute set to 0.001 in both input fields
      • Results: Chrome indifferent. Firefox sensitive to inputs in both fields, requires decimal comma.
    3. Setting 3:
      • lang attribute of the body set to de-DE
      • lang attribute of input field #2 set to en-US
      • step attribute set to 0.001 in both input fields
      • Results: Chrome indifferent to input with decimal point or comma. Firefox sensitive to inputs in field #1 (requires decimal comma), indifferent to inputs in field #2.
    4. Setting 4:
      • lang attribute of the body set to en-US
      • lang attribute of input field #1 set to de-DE
      • lang attribute of input field #2 set to en-US
      • step attribute set to 0.001 in both input fields
      • Results: Chrome indifferent to input with decimal point or comma. Firefox sensitive to inputs in field #1 (requires decimal comma), indifferent to inputs in field #2.
    5. Setting 5:
      • lang attribute of the body set to en-US
      • no lang attribute set on input fields
      • step attribute set to 0.001 in both input fields
      • Results: Chrome indifferent to input with decimal point or comma. Firefox indifferent.

    Conclusion: The validation of the input type number field depends indeed on the browser, i.e. validation rules vary across browsers. While Firefox applies stricter rules than Chrome, and – as far as I read – Safari.

    So, how can I add a radio button in the ACF field settings to choose a lang attribute and then set the input field to it?