Stefan Korn

Results 67 comments of Stefan Korn

The property should not exist at all. An optional value, you can select one from the list or select "None" and then it is empty.

Okay, then we could just use `if (!$this->checkIfRequired($field_name, $element_schema)) {` instead of `if ($property->empty_value) {` ? (see PR #4037)

Yes, no value is saved in the JSON if the empty option is chosen. Updated the PR.

can't you use "placeholderValue" config option?

see #4159 : Currently this is not a complete solution provided in this PR.

@dafeder : You surely know, but if you set schema property "format" to "uri" for a string field, the maxlength will increase to 255. That is because the JSON Form...

How about PR #4168. This would increase the limit just for "textfield" elements provided by JSON Form widget.

maybe leave a hint or ToDo pointing to https://www.drupal.org/project/drupal/issues/3331028 in the code comments?

@dafeder : While fixing the tests in #4168 I came across ArrayHelper. There is [buildSimpleArrayElement](https://github.com/GetDKAN/dkan/blob/2.x/modules/json_form_widget/src/ArrayHelper.php#L265) which builds a texfield without maxlength too. Not sure if maxlength should be set there...