<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
  <title>aC forum: Altering the field type used when updating a user profile</title>
  <link>http://www.activecollab.com/forums/topic/4622/</link>
  <description>Recent posts on topic: Altering the field type used when updating a user profile</description>
  <dc:language>en-us</dc:language>
  <pubDate>Wed, 23 May 2012 20:29:29 CDT</pubDate>
  
  <item>
    <link>http://www.activecollab.com/forums/post/20754/#post20754</link>
    <guid>http://www.activecollab.com/forums/post/20754/#post20754</guid>
    <title>Post #5 by Guy C.</title>
    <dc:creator>Guy Cortesi</dc:creator>
    <description><![CDATA[<p>Thanks - totally missed that one.  I was doing this pretty late at night at guess I need some more rest!!  I appreciate your help.  It's working exactly as I wanted it to now.<br />
<br />
Guy</p>]]></description>
    <pubDate>Wed, 10 Jun 2009 06:32:42 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/20742/#post20742</link>
    <guid>http://www.activecollab.com/forums/post/20742/#post20742</guid>
    <title>Post #4 by Greg_TBone</title>
    <dc:creator>Greg_TBone</dc:creator>
    <description><![CDATA[<p>Yes, use curly brackets instead of round ones. :-)<br />
<br />
Anything surrounded by curly brackets in a view template file is interpreted by Smarty, which is what you want in order to display the value in the $user_data.title variable.<br />
<br />
So you should have: <br />
<br />
{wrap field=title}<br />
{label for=userTitle}Title{/label}<br />
{textarea_field name='user[title]' id=userTitle}{$user_data.title}{/textarea_field}<br />
{/wrap}<br />
<br />
That should be all you need.</p>]]></description>
    <pubDate>Tue, 09 Jun 2009 23:36:38 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/20741/#post20741</link>
    <guid>http://www.activecollab.com/forums/post/20741/#post20741</guid>
    <title>Post #3 by Guy C.</title>
    <dc:creator>Guy Cortesi</dc:creator>
    <description><![CDATA[<p>Thanks for the post Greg_TBone--<br />
<br />
I altered the code to be like the working code like this:<br />
<br />
      {wrap field=title}<br />
        {label for=userTitle}Title{/label}<br />
        {textarea_field name='user[title]' id=userTitle}($user_data.title){/textarea_field}<br />
      {/wrap}<br />
<br />
Now It displays ($user_data.title) in the textarea, instead of the current value for that field.  <br />
<br />
Any other suggestion?<br />
<br />
Thx - <br />
<br />
Guy<br />
</p>]]></description>
    <pubDate>Tue, 09 Jun 2009 22:45:32 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/20740/#post20740</link>
    <guid>http://www.activecollab.com/forums/post/20740/#post20740</guid>
    <title>Post #2 by Greg_TBone</title>
    <dc:creator>Greg_TBone</dc:creator>
    <description><![CDATA[<p>Guy,<br />
<br />
It looks like the problem is where you place the smarty code to display the existing data.<br />
<br />
The short version: for text fields, it's in the value attribute. For text areas, it's between the start and end tags.<br />
<br />
Notice how the working example you posted has the &quot;{$company_data.office_address}&quot; in the middle of the {textarea_field ...} and {/textarea_field} tags? I think that's the main difference for text areas.<br />
<br />
Hope this helps!</p>]]></description>
    <pubDate>Tue, 09 Jun 2009 21:54:55 CDT</pubDate>
  </item>
  <item>
    <link>http://www.activecollab.com/forums/post/20738/#post20738</link>
    <guid>http://www.activecollab.com/forums/post/20738/#post20738</guid>
    <title>Post #1 by Guy C.</title>
    <dc:creator>Guy Cortesi</dc:creator>
    <description><![CDATA[<p>I am trying to change the text field displayed when you Update a User Profile found in activecollab/application/modules/system/views/users/edit_profile.tpl<br />
<br />
I would like to make the Title field display as a textarea_field instead of a text_field.  This will present an expandable text field so I can enter more text for a longer title.  I have changed this code <br />
<br />
from:<br />
    &lt;div class=&quot;col&quot;&gt;<br />
      {wrap field=title}<br />
        {label for=userTitle}Title{/label}<br />
        {text_field name='user[title]' value=$user_data.title id=userTitle}<br />
      {/wrap}<br />
<br />
    &lt;/div&gt;<br />
<br />
to:<br />
<br />
      {wrap field=title}<br />
        {label for=userTitle}Title/Description{/label}<br />
        {textarea_field name='user[title]' value=$user_data.title id=userTitle}{/textarea_field}<br />
      {/wrap}<br />
<br />
This works.  However, any currently entered text is not displayed in the text box.  If you look at activecollab/application/modules/system/views/companies/_profile_form.tpl <br />
a textarea_field is used to display the Address, and it properly displays the current Address when you edit the Company Profile.  Here is the code that appears to work:<br />
<br />
  {wrap field=office_address}<br />
    {label for=companyAddress}Address{/label}<br />
    {textarea_field name='company[office_address]' id=companyAddress}{$company_data.office_address}{/textarea_field}<br />
  {/wrap}<br />
<br />
What do I need to do so the textarea_field displays the existing value?<br />
<br />
</p>]]></description>
    <pubDate>Tue, 09 Jun 2009 15:42:24 CDT</pubDate>
  </item>
</channel>
</rss>
