i am trying to register a new user over openfire , so far i am able to register it over server but i want to add some more fields like phone , address in the user registration form
as of now there is only a provision of setting username , fullname , password and email at the time of registering a user over server
but i want to add more fields , how can i do that ?
i tried followin code , but i dont know how to sent fromToSend to the server as a packet or something ?
Form formToSend = new Form(Form.TYPE_FORM);
FormField username = new FormField("username");
username.setType(FormField.TYPE_TEXT_SINGLE);
formToSend.addField(username);
FormField name = new FormField("name");
name.setType(FormField.TYPE_TEXT_SINGLE);
formToSend.addField(name);
FormField password = new FormField("password");
password.setType(FormField.TYPE_TEXT_PRIVATE);
formToSend.addField(password);
FormField email = new FormField("email");
name.setType(FormField.TYPE_TEXT_SINGLE);
formToSend.addField(email);
FormField phone = new FormField("phone");
phone.setType(FormField.TYPE_TEXT_SINGLE);
formToSend.addField(phone);
i am taking referece of folloing xml stanza
<form_type>
<name>jabber:iq:register</name>
<doc>XEP-0077</doc>
<desc>Standardization of fields related to registration use case.</desc>
<field
var='username'
type='text-single'
label='Username'/>
<field
var='name'
type='text-single'
label='Full name'/>
<field
var='password'
type='text-private'
label='Password'/>
<field
var='email'
type='text-single'
label='Email address of the user'/>
<field
var='phone'
type='text-single'
label='Mobile Phone'/>
</form_type>