diff --git a/src/xmpp/form.c b/src/xmpp/form.c index a77b8e88..ad4ffa3e 100644 --- a/src/xmpp/form.c +++ b/src/xmpp/form.c @@ -208,12 +208,15 @@ form_create(xmpp_stanza_t * const form_stanza) field->type_t = _get_field_type(field->type); field->var = _get_attr(field_stanza, "var"); - GString *tag = g_string_new(""); - g_string_printf(tag, "field%d", tag_num++); - g_hash_table_insert(form->var_to_tag, strdup(field->var), strdup(tag->str)); - g_hash_table_insert(form->tag_to_var, strdup(tag->str), strdup(field->var)); - autocomplete_add(form->tag_ac, tag->str); - g_string_free(tag, TRUE); + + if (field->type_t != FIELD_HIDDEN) { + GString *tag = g_string_new(""); + g_string_printf(tag, "field%d", tag_num++); + g_hash_table_insert(form->var_to_tag, strdup(field->var), strdup(tag->str)); + g_hash_table_insert(form->tag_to_var, strdup(tag->str), strdup(field->var)); + autocomplete_add(form->tag_ac, tag->str); + g_string_free(tag, TRUE); + } field->description = _get_property(field_stanza, "desc"); field->required = _is_required(field_stanza);