mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-04 23:55:58 +01:00
[xdata] Automatically fill required fields with a default value
This commit is contained in:
parent
68edc8b9f5
commit
090858f467
1 changed files with 7 additions and 1 deletions
|
@ -59,7 +59,13 @@ public class FillableForm extends FilledForm {
|
|||
if (formField.isRequired()) {
|
||||
String fieldName = formField.getFieldName();
|
||||
requiredFields.add(fieldName);
|
||||
missingRequiredFields.add(fieldName);
|
||||
|
||||
if (formField.hasValueSet()) {
|
||||
// This is a form field with a default value.
|
||||
write(formField);
|
||||
} else {
|
||||
missingRequiredFields.add(fieldName);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.requiredFields = Collections.unmodifiableSet(requiredFields);
|
||||
|
|
Loading…
Reference in a new issue