diff --git a/source/org/jivesoftware/smackx/FormField.java b/source/org/jivesoftware/smackx/FormField.java index 046d459e2..a45bf7336 100644 --- a/source/org/jivesoftware/smackx/FormField.java +++ b/source/org/jivesoftware/smackx/FormField.java @@ -81,6 +81,16 @@ public class FormField { private List options = new ArrayList(); private List values = new ArrayList(); + /** + * Creates a new FormField with the variable name that uniquely identifies the field + * in the context of the form. + * + * @param variable the variable name of the question. + */ + public FormField(String variable) { + this.variable = variable; + } + /** * Returns a description that provides extra clarification about the question. This information * could be presented to the user either in tool-tip, help button, or as a section of text @@ -229,15 +239,6 @@ public class FormField { this.type = type; } - /** - * Returns the variable name that the question is filling out. - * - * @param variable the variable name of the question. - */ - public void setVariable(String variable) { - this.variable = variable; - } - /** * Adds a default value to the question if the question is part of a form to fill out. * Otherwise, adds an answered value to the question.