Developer forum

Forum » Templates » How to save values to customfields on users in Extranet module

How to save values to customfields on users in Extranet module

Martin Nielsen
Reply

Hi guys,

 

I'm trying to update information on a user via the Extranet/Intranet module, but i cannot find what name my input fields should have for it to work.

 

When doing "DwTemplateTags" i do not get the ".InputName" tag for my customfields, but i do for the standard fields.

 

Can some1 tell me the syntax for the inputname?

 

// Martin


Replies

 
Anders Ebdrup
Reply

Hi Martin

 

For handling the custom fields on the user I have this:

<label for="UserManagement_Form_AccessUser_HouseNumber">
  <!--@UserManagement:User.AccessUser_HouseNumber.Name-->: 
</label>
<input id="UserManagement_Form_AccessUser_HouseNumber" class="input-mini" type="text" name="CustomField.AccessUser_AccessUser_HouseNumber" value="<!--@SmartPage:User.AccessUser_HouseNumber-->"/>

And in my UserTemplateExtender I have added:

template.SetTag("SmartPage:User.AccessUser_HouseNumber",
                                Base.Request("CustomField.AccessUser_AccessUser_HouseNumber", false));

 

Hope this can help you?

 

Best regards, Anders

 
Oleg Rodionov
Reply
This post has been marked as an answer

Hi all,

There is regular ability-custom field loop provided by DW. You should use that as follows: 

 

<!--@LoopStart(UserManagement:User.CustomFields)-->
    <tr>
	<th align="left"><!--@CustomField.Name-->: </th>
 	    <td><!--@CustomField.Control--></td>
    </tr>
<!--@LoopEnd(UserManagement:User.CustomFields)-->
Pls, find attached template can be used for an user editing. The user should be logged in the frontend surely. I've just tested the feature on DW8.2.3 recently released and have good results.

BR, Oleg

Votes for this answer: 1

 

You must be logged in to post in the forum