Toggle menu

User Profile - Save

This field can be used to save a site user's profile. It will perform this, server-side, when the form is submitted.

The profile should first be loaded into a server-side form variable using the User Profile - Load field. This field can then be used to modify the data stored in the variable (see the Data Function property) and then save it back to the database.

If the profile is for a new user (the userID value within the loaded profile data is empty), a new site user will be automatically created before the profile is saved. The new user's name will need to have been stored in the profile data field specified via the User Name Field property. The password will be set to a random GUID.

Properties

LabelDescriptionType Name
Data FunctionThe JavaScript function that is executed server-side to get the user profile data that is to be saved/updated.

An example updating a first name, assuming the profile data has been loaded into a form variable called "USERPROFILE":

function( helper, processor, props, context ) {
    let profileData = helper.getVariable("USERPROFILE");
    if ( profileData ) {
        profileData.FIRSTNAME = helper.getFieldValue("FIRSTNAME");
    }
    return profileData ;
}

Note that only the FIRSTNAME element within the user profile is being modified here.

If saving a new user's profile, this Data Function will also need to set the User Name Field's value to the new user's name. For example,

profileData.USERNAME = helper.getFieldValue("USERNAME");
DATAFUNC
User Name FunctionThe JavaScript function that is executed server-side to get a new user's name (when creating a new user). If you are updating an existing user's profile this property serves no purpose.

An example, assuming the new user's name is input via a field on the form:

function( helper, processor, props, context ) {
    return helper.getFieldValue("USERNAME");
}
USERNAMEFUNC
Failure messageMessage to be displayed if the save fails to completeFAILUREMESSAGE
Success messageMessage to be displayed when the save completes successfullySUCCESSMESSAGE
DocumentationAdd documentation to your field to help explain any complex functionality to future users. You might include information on what the field does and how it relates to other fields on the form. Notes added here are only ever visible in the Forms Designer, they can be searched for, viewed and downloaded from the action panel. See Common Field Properties for an exampleDOCUMENTATION
Last modified on 7 April 2026