Closed (won't fix)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2020 at 13:36 UTC
Updated:
20 Mar 2020 at 08:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jrockowitz commentedNowhere is Drupal are periods allowed in machine names.
For elements, we could add support for custom machine name patterns (/admin/structure/webform/config/elements), but I must emphasize you would be on your own if you run into unexpected issues.
@see https://www.drupal.org/node/2297311
Comment #3
Cecilina commentedYes. Understand but one of microservice need that supported format.
Here is the patch.
Comment #4
jrockowitz commentedI am okay with adding this feature but we need to support "Lowercase letters" too.
Please don't change !$this->webform->hasVariants() to !$this->webform->hasVariant()
Comment #5
jrockowitz commentedElement machine names with periods don't work as expected and the inputed data is not posted back to the server.
Below is an example element for the attached example webform.
Here is a screencast showing the data loss.
HTML does allow periods in input names.
@see https://stackoverflow.com/questions/12651114/is-it-valid-to-put-a-period...
PHP does NOT allow periods in input names.
@see https://stackoverflow.com/questions/20575426/get-post-in-php-with-dot-in...
From: https://www.php.net/manual/en/language.variables.external.php
If you need periods in data posted via a remote post handler, you will have to write custom code.