Closed (fixed)
Project:
DvG Webform Components
Version:
7.x-1.0-beta9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2017 at 11:14 UTC
Updated:
9 Jul 2018 at 15:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ruudvanoijen commentedThe patch
Comment #3
askibinski commentedThis line is undesirable:
The isset checks are nice, the other changes seem unnecessary.
The real problem is the return FALSE in dvg_webform_components_phone_number_value();
Comment #4
ruudvanoijen commentedFixed. Removed the false in the value callback. I've removed the element[#value]. The rest of the checks are improvements i've copied of the mail component from webform.
Comment #5
Danny.Wouters commentedThe new patch looks good!
The additional changes in the patch are not directly linked to the original issue but I think they are good improvements
Comment #6
scuba_flyI Applied the patch, but still if I step back trough the form, the phone number field is empty.
Comment #7
joshahubbers commentedNew patch for latest version. The previous patch was already applied in the source.
This patch fixes the problem that an empty value was never validated as valid, even if the element was not required.
The value is preserved when you go "back" in the form.
Comment #8
joshahubbers commentedThis patch is equal to the one in #7, but for the .9 version.
Comment #9
joshahubbers commentedComment #10
askibinski commentedApproved en tested in these cases:
* create webform with two pages
* place phone number field on page 1 - unrequired
* submit empty -> pass
* submit wrong value -> shows correct error
* submit correct value -> pass
* go step back from page 2, shows value in page 1
* make field required
* submit empty -> shows correct error
Comment #11
paulvandenburg commentedThe #8 patch is made for dvg not this module.
The #7 patch does apply.
Comment #13
paulvandenburg commented