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
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
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
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:
It looks like the problem is where you place the smarty code to display the existing data.
The short version: for text fields, it's in the value attribute. For text areas, it's between the start and end tags.
Notice how the working example you posted has the "{$company_data.office_address}" in the middle of the {textarea_field ...} and {/textarea_field} tags? I think that's the main difference for text areas.
Hope this helps!
T-Bone Productions, Sydney Based Professional Web Development - http://www.t-bone.com.au
Yes, use curly brackets instead of round ones. :-)
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.
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.
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
from:
<div class="col">
{wrap field=title}
{label for=userTitle}Title{/label}
{text_field name='user[title]' value=$user_data.title id=userTitle}
{/wrap}
</div>
to:
{wrap field=title}
{label for=userTitle}Title/Description{/label}
{textarea_field name='user[title]' value=$user_data.title id=userTitle}{/textarea_field}
{/wrap}
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
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:
{wrap field=office_address}
{label for=companyAddress}Address{/label}
{textarea_field name='company[office_address]' id=companyAddress}{$company_data.office_address}{/textarea_field}
{/wrap}
What do I need to do so the textarea_field displays the existing value?