title: How to add a new field to joomla register form?
body: <p>I am trying to make a joomla plugin, but I have few questions that I haven't found any answer. </p>
  
  <p>What the plugin has to do: add a new field in register form(let's say Cell Number), and on form submit insert that cell number in database.</p>
  
  <p>My documentation is this <a href="https://docs.joomla.org/Creating_a_profile_plugin" rel="nofollow">tutorial</a>.</p>
  
  <p>Questions:</p>
  
  <ul>
  <li><p>How do you add a new field in register form? xml file is done, but I am not sure how to write the php code...(please help). What this code do? </p>
  
  <p>$form->setFieldAttribute('something', 'required', $this->params->get('profile-require_something') == 2, 'profile5');</p></li>
  <li><p>How do I get the cell number variable from that form? <code>$jinput = JFactory::getApplication()-&gt;input;</code> ?</p></li>
  </ul>
  
  <p>Pleas help me with few tips. Thanks!</p>