Support

Account

Home Forums General Issues Update a field dynamically when a user is created or updated

Solving

Update a field dynamically when a user is created or updated

  • Trying to fill a field dynamically depending on another field when a user is created or updated.

    In my brain it would work something like

    update_field('title_value','update_t_v',???);
    
    function update_t_v($value){
    if (get_field('title_label',???) == 'Senior') {
    $value = 4;
    return $value 
    }
    else if .... {
    ...
    }
    else {
    return null;
    }
    }

    I’m not sure if that would work, but I’m also not sure how to make it run when a user is created or edited.

  • You are going to need to provide a lot more information to get help.

    What type of field is being added to the user?

    Where is the field located that you want to update?

    What type of field are you trying to update?

  • One is a text field, the other is a number field. They are both fields attached to users.

    We import users by excel with most fields because they are a direct export from the directory.
    The text field comes from that that import, so I wanted the number field to be filled dynamically.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.