Keyword

K2 User form extra fields

More
14 years 5 months ago #84237 by ozzy
K2 User form extra fields was created by ozzy
Hi,I've added new fields to user form like age, city, interest etc. but when I logged in and display the user edit page, new added fields not shown but when I refresh they show up, what might be the problem? please help. code is below. by the way, I am using tabs to display the form. </div>    <div class="simpleTabsContent">    <table cellpadding="0" cellspacing="4" border="0" width="100%">    <tr>      <td><label for="username"> <?php echo JText::_( 'User Name' ); ?>: </label></td>      <td><span style="font-weight:bold"><?php echo $this->user->get('username');?></span></td>    </tr>    <tr>      <td  width="12%" height="40"><label id="imagemsg" for="image"> <?php echo JText::_( 'Avatar' ); ?>:</label></td>      <td  height="40"><div class="spec">                <?php if ($this->K2User->image):?>        <img class="small" src="<?php echo JURI::root().'media/k2/users/'.$this->K2User->image;?>" alt="<?php echo $this->user->name; ?>" />        <input  type="checkbox" name="del_image" id="del_image" />        <label for="del_image"><?php echo JText::_('Upload new image to replace existing avatar or check this box to delete user avatar');?></label>        <?php endif;?>                <?php if (!$this->K2User->image): ?>                <img class="small" src="<?php echo JURI::root().'media/k2/users/user.png'.$this->K2User->image;?>" alt="<?php echo $this->user->name; ?>" />              <?php endif;?>           <br />       <input class="inp" type="file" id="image" name="image"/></td></div>    </tr>        <tr height="5">    <tr>          <td width="120"><label for="name"> <?php echo JText::_( 'Your Name' ); ?>: </label></td>      <td><input class="inputbox required" type="text" id="name" name="name" value="<?php echo ucwords($this->escape($this->user->get('name')));?>" size="30"/></td>    </tr>    <tr>      <td><label for="email"> <?php echo JText::_( 'email' ); ?>: </label></td>      <td><input class="inputbox required validate-email" type="text" id="email" name="email" value="<?php echo $this->escape($this->user->get('email'));?>" size="30" /></td>    </tr>        <?php if($this->user->get('password')) : ?>    <tr>      <td><label for="password"> <?php echo JText::_( 'Password' ); ?>: </label></td>      <td><input class="inputbox validate-password" type="password" id="password" name="password" value="" size="30" /></td>    </tr>    <tr>      <td><label for="password2"> <?php echo JText::_( 'Verify Password' ); ?>: </label></td>      <td><input class="inputbox validate-passverify" type="password" id="password2" name="password2" size="30" /></td>      <?php endif; ?>    </tr>    <tr>    <td><label for="age"><?php echo Jtext::_( 'age' ); ?>: </label></td>    <td><input class="validate-integer" type="text" id="age" name="age" value="<?php echo $this->user->profile->age;?>" size="1"/></td></tr>        <tr>      <td height="20"><label id="gendermsg" for="gender"> <?php echo JText::_( 'Gender' ); ?>: </label></td>      <td><?php echo $this->lists; ?>      </td>    </tr>    <tr>    <td><label id="urlmsg" for="city"><?php echo Jtext::_( 'city' ); ?>: </label></td>    <td width="10"><input type="text" id="city" name="city" value="<?php echo ucwords($this->user->profile->city);?>" size="30"/></td>    </tr>            <tr style="margin-top:3px">    <td valign="top"><label for="about"><?php echo Jtext::_( 'about' ); ?>: </label></td>        <td width="10"><textarea class="desc" style="" type="fulltext" id="about" name="about" size="50"><?php echo $this->user->profile->about;?></textarea></td><td><span class="editlinktip hasTip" title="Tooltip title::This is the tooltip text"><img src="<?php echo JURI::root().'images/M_images/con_info.png';?>" border="0" alt="Tooltip"/></span></td>    </tr>                <tr>      <td height="28"><label id="urlmsg" for="url"> <?php echo JText::_( 'Url' ); ?>: </label></td>      <td  width="10" style="padding:0"><input type="text" size="56" value="<?php echo $this->K2User->url; ?>" name="url" id="url"/>       </td>        <td valign="middle" width="123"><span class="hasTip" title="Tooltip title::This is the tooltip text" ><img src="<?php echo JURI::root().'images/M_images/con_info.png';?>" border="0" alt="Tooltip"/></span></td>    </tr>        <tr>      <td valign="top" height="15"><label for="interest"> <?php echo JText::_( 'interest' ); ?>: </label></td>      <td  width="10"><textarea class="desc" type="fulltext" name="interest" id="interest"/><?php echo $this->user->profile->interest; ?></textarea>       </td>        <td valign="middle" width="123"><span class="hasTip" title="Tooltip title::This is the tooltip text" ><img src="<?php echo JURI::root().'images/M_images/con_info.png';?>" border="0" alt="Tooltip"/></span></td>    </tr>        <?php if (count($this->K2Plugins)):?>    <?php foreach ($this->K2Plugins as $K2Plugin) : ?>    <tr>      <td colspan="2"><?php echo $K2Plugin->fields;?></td>    </tr>    <?php endforeach; ?>    <?php endif;?>      </table>  </div>  <button class="button validate" type="submit" onclick="submitbutton( this.form );return false;"><?php echo JText::_('Save'); ?></button>  <input type="hidden" name="username" value="<?php echo $this->user->get('username');?>" />  <input type="hidden" name="id" value="<?php echo $this->user->get('id');?>" />  <input type="hidden" name="gid" value="<?php echo $this->user->get('gid');?>" />  <input type="hidden" name="option" value="com_user" />  <input type="hidden" name="task" value="save" />  <input type="hidden" name="K2UserForm" value="1" />  <?php echo JHTML::_( 'form.token' ); ?>    </div></div>

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum