Problem/Motivation

The issue #1783628: Add html5 required attribute to webform components. added the html5 'required' attribute to required webform components. This attribute needs to be added per component.

Proposed resolution

Implement the html5 required attribute for the Phone number webform component.

Remaining tasks

Write a patch

User interface changes

Reference: http://www.w3schools.com/tags/att_input_required.asp

API changes

None

Data model changes

None

Comments

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new903 bytes

Attached patch implements the html5 required attribute for the Webform Phone number component.

Note: Webform has javascript logic to determine if a conditional field is required. The related patch in Webform also updates this logic to remove the required attribute for validation, but it does not include the input[type="tel"] fields. As a result, the webform validation might not be triggered correctly, but this needs to be fixed in webform itself.

  • RadioActiv committed 76413eb on 7.x-1.x
    Issue #2557897 by idebr: Added HTML5 required attribute to webform_phone...
RadioActiv’s picture

Status: Needs review » Closed (fixed)

Committed to 7.x-1.x branch. Release 7x.-1.23 created.