diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/form/FillableForm.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/form/FillableForm.java index 22f257a4e0..b40cb92a82 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/form/FillableForm.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/form/FillableForm.java @@ -59,7 +59,13 @@ public FillableForm(DataForm dataForm) { 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);